This option ticked all the boxes for me and I ran with it for a little while without issue, although with more setup needed than the minikube option. I therefore backed away at this point as I had another option to try first … Enter lima + nerdctl … But these look quite hasslesome (caveat: I didn’t try very hard □ ) I looked around this topic a bit and there are some suggested workarounds, such as this one to mount the directory onto the podman VM first. However, as mentioned earlier this crucially does not work: # /build is empty □ podman run -rm -it -p 8080:80 -v $(pwd):/build podman-test # run it, exposing port podman run -d -p 8080:80 podman-test # see the appropriate output from nginx curl Other similar docker commands I tend to use also seem present: podman ps podman stop podman exec -i -t /bin/bash # a subtlety - requires -i -t rather than allowing -it Your docker equivalents should then work as intended: # builds a Dockerfile containing a basic nginx image podman build -t podman-test -f Dockerfile. these were cobbled together from the Podman installation guide itself plus this great blog post - although I didn’t need most of the complexity involved here (I’m guessing it has been fixed since).įrom their install guide - things are nice and simple: brew install podman podman machine init podman machine start # bring up the daemon That said, if that’s not important to you or they fix it subsequently, I’ve included the steps below. It mostly worked fine but, as mentioned earlier, for me the crucial issue was the lack of ability to mount volumes from the host OS. My first attempt was with Podman …Īfter realising that hyperkit didn’t work on M1, this was the next option I tried. However, I also needed an option that worked with Apple Silicon. Volume mounts aren’t seamless (although pretty simple tbh).Doesn’t currently support Apple Silicon (or at least, using the hyperkit driver does not).It’s great if you want to do Kubernetes development locally and liked that feature in Docker Desktop.There’s minimal extra config/scripts needed - almost a drop-in replacement.You’re still using the docker CLI, so very good from a compatibility point of view.In my opinion, the advantages of this option - and why I kept it as the setup on my older Macbook - are: You can minikube mount to spin up a process to mount your local directory into the minikube VM: minikube mount your-local-directory/:/build >/dev/null 2>&1 & docker run -v /build:/build -rm -it eu.gcr.io/my-private-registry-project/alex-ubuntu:latest However, volume mounts from the host did not … but thankfully the blog post I linked above has captured the solution for this. As it’s still just the same docker CLI, the credentials helper to connect to a private registry also works fine out-the-box. zshrc, in my case).Īs you can see, pretty straight-forward standard brew installation stuff - plus a couple of commands to run before you try and do docker things (I personally never had Docker running all the time on startup anyway, as it was such a battery drain). I have the minikube start command set up in a start-docker.sh script I can run when needed, and the minikube docker-env in my shell startup (. The instructions that follow are heavily based on this excellent blog post, which has some additional advice, especially if you want to get more out of the local Kubernetes cluster: # pre-req: full install of XCode needed - just the CLI isn't enough # this steps fails on Apple Silicon: brew install hyperkit brew install docker # don't use -cask brew install minikube # bring up the daemon - which errors on Apple Silicon minikube start -driver=hyperkit -keep-context # tells docker in your *current shell* to use minikube's daemon eval $(minikube docker-env) It’s fully docker compliant, if there is such a thing. I used this on my older Macbook for a little while before replacing it with Rancher Desktop. This is a simple near “drop-in” replacement for Docker Desktop, but does not work on M1 Macs. This link should take you directly to the relevant bit: Īlternatively, see their source on Github for additional configuration options as needed. I’ve included some further tips n tricks for running it with better compatibility with third party tooling, as well as exploring some of its other options in my own blog site. You can of course use colima stop to shut it down to save resources on your machine if desired between docker sessions. The first time you do this is a little slower due to downloading the image and configuring it, but following that only takes a few seconds on my machine. You need the docker CLI installed too ( brew install docker) if you don’t have it already also.įollowing installation, you then issue colima start when you want to start the daemon, and after that completes, you should find that docker commands work as normal. The installation is incredibly straight-forward, just brew install colima.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |