$ cat ./posts/jan-22,-2022
Docker Desktop — Moving away
Docker Desktop is going paid. Here's how to switch to nerdctl or podman on macOS.
Docker is changing its licensing model and Docker Desktop will require a subscription starting 31st Jan 2022, more details here.
Docker Engine provides a runtime for Containers, other popular container runtimes are:
All container runtimes follow certain set of standards set by OCI initiative.
Next, we need a CLI which can spawn and manage containers using any of OCI Compliant runtimes, here we’re exploring below 2 options:
Installing nerdctl on macOS
brew install lima
limactl start
Few basic commands:
# see running containers
lima nerdctl ps
# run a new container
lima nerdctl run nginx
# display details of local images
lima nerdctl images
# building a new image
nerdctl build -t foo /some-dockerfile-directory
Commands are similar to docker commands, thus you can create an alias and continue to use same old docker commands.
alias docker="lima nerdctl"
Note: limactl start will create a ubuntu (default) virtual machine.
You can run commands inside this machine by prefixing commands with lima such as:
lima uname -a
When you’re done using containers, do limactl stop to stop the virtual machine, and limactl remove default to remove the image.
Installing podman on macOS
brew install podman
podman machine init
podman machine start
Few basic commands:
# see running containers
podman ps
# run a new container
podman run nginx
# display details of images
podman images
# building a new image
podman build -t foo /some-dockerfile-directory
As commands are similar to docker you can create an alias:
alias docker="podman"
Click here for more details on podman.
Note: podman machine init downloads a fedora-coreos virtual machine image. podman machine start will create a virtual machine using qemu virtualisation on macOS.
To cleanup afterwards:
podman machine stop
podman machine rm