Forked from mbiemann/colima-docker-apple-silicon.md
Created
February 7, 2025 06:44
-
-
Save anoopprasad/4504e1568da11f6f51f3387b5a2728f1 to your computer and use it in GitHub Desktop.
Revisions
-
mbiemann revised this gist
Feb 10, 2022 . 2 changed files with 54 additions and 35 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,54 @@ # Using colima and Docker Engine on Apple Silicon (M1 Chip) This tutorial uses [Homebrew](https://brew.sh) to install [colima](https://github.com/abiosoft/colima/) and [Docker](https://docs.docker.com/engine/). It was tested on Apple MacBook Pro (13-inch, M1, 2020) 8G and macOS Monterey version 12.1 (21C52). ## Uninstall any Docker version Make sure you have fully uninstall any versions of Docker. You can check using: - `docker ps` - `which docker` ## Installation, starting and testing First, install colima and docker by brew: ```sh $ brew install colima docker ``` Then, initialize and start colima, to be the daemon of docker: ```sh $ colima start ``` Finally, test the docker (it must show an empty list of containers): ```sh $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ``` Here's some another tests: ```sh $ docker run hello-world $ docker run -it ubuntu bash ``` > To get out of the ubuntu bash, type exit and enter. ## Troubleshooting If you got a error about `docker-credentials-xxx`, open the file `~/.docker/config.json` and delete the `credsStore`. Maybe the file will looks like this: ```json { "auths": {}, "currentContext": "colima" } ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,35 +0,0 @@ -
mbiemann revised this gist
Feb 10, 2022 . 1 changed file with 13 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,24 +9,27 @@ $ podman machine init --cpus=1 --disk-size=30 --memory=2 $ podman machine start ``` Test some containers: ```sh $ podman run hello-world $ podman run -it ubuntu bash $ podman run -it python $ podman run -it public.ecr.aws/sam/build-python3.9 $ podman run -it public.ecr.aws/sam/emulation-python3.9 ``` Free space: ```sh $ podman system prune --all --force --volumes ``` Create a symlink to execute podman instead docker: ```sh $ sudo ln -s /opt/homebrew/bin/podman /usr/local/bin/docker ``` .ssh/podman-machine-default -
mbiemann revised this gist
Feb 10, 2022 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,10 @@ Make sure you have fully uninstall the Docker and podman. Install podman by using Homebrew: ```sh $ brew install podman $ podman machine init --cpus=1 --disk-size=30 --memory=2 $ podman machine start ``` -
mbiemann revised this gist
Feb 10, 2022 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,12 @@ Make sure you have fully uninstall the Docker, qemu, lima and podman. Install podman by using Homebrew: ```sh $ brew install lima podman $ limactl start /opt/homebrew/Cellar/lima/0.8.2/share/doc/lima/examples/podman.yaml $ podman machine init --cpus=1 --disk-size=30 --memory=2 $ podman machine start ``` @@ -29,4 +30,4 @@ Free space: ```sh $ docker system prune --all --force --volumes ``` -
mbiemann created this gist
Feb 9, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ Make sure you have fully uninstall the Docker. Install podman by using Homebrew: ```sh $ brew install podman $ podman machine init --disk-size=30 $ podman machine start ``` Create a symlink to execute podman instead docker: ```sh $ sudo ln -s /opt/homebrew/bin/podman /usr/local/bin/docker ``` Test some containers: ```sh $ docker run hello-world $ docker run -it ubuntu bash $ docker run -it python $ docker run -it public.ecr.aws/sam/build-python3.9 $ docker run -it public.ecr.aws/sam/emulation-python3.9 ``` Free space: ```sh $ docker system prune --all --force --volumes ```