Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save anoopprasad/4504e1568da11f6f51f3387b5a2728f1 to your computer and use it in GitHub Desktop.
Save anoopprasad/4504e1568da11f6f51f3387b5a2728f1 to your computer and use it in GitHub Desktop.

Revisions

  1. @mbiemann mbiemann revised this gist Feb 10, 2022. 2 changed files with 54 additions and 35 deletions.
    54 changes: 54 additions & 0 deletions colima-docker-apple-silicon.md
    Original 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"
    }
    ```

    35 changes: 0 additions & 35 deletions podman.md
    Original file line number Diff line number Diff line change
    @@ -1,35 +0,0 @@

    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
    ```

    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

  2. @mbiemann mbiemann revised this gist Feb 10, 2022. 1 changed file with 13 additions and 10 deletions.
    23 changes: 13 additions & 10 deletions podman.md
    Original 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
    ```

    Create a symlink to execute podman instead docker:
    Test some containers:

    ```sh
    $ sudo ln -s /opt/homebrew/bin/podman /usr/local/bin/docker
    $ 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
    ```

    Test some containers:
    Free space:

    ```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
    $ podman system prune --all --force --volumes
    ```

    Free space:
    Create a symlink to execute podman instead docker:

    ```sh
    $ docker system prune --all --force --volumes
    $ sudo ln -s /opt/homebrew/bin/podman /usr/local/bin/docker
    ```

    .ssh/podman-machine-default

  3. @mbiemann mbiemann revised this gist Feb 10, 2022. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions podman.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,10 @@

    Make sure you have fully uninstall the Docker, qemu, lima and podman.
    Make sure you have fully uninstall the Docker 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
    $ brew install podman
    $ podman machine init --cpus=1 --disk-size=30 --memory=2
    $ podman machine start
    ```
  4. @mbiemann mbiemann revised this gist Feb 10, 2022. 1 changed file with 5 additions and 4 deletions.
    9 changes: 5 additions & 4 deletions podman.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,12 @@

    Make sure you have fully uninstall the Docker.
    Make sure you have fully uninstall the Docker, qemu, lima and podman.

    Install podman by using Homebrew:

    ```sh
    $ brew install podman
    $ podman machine init --disk-size=30
    $ 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
    ```
    ```
  5. @mbiemann mbiemann created this gist Feb 9, 2022.
    32 changes: 32 additions & 0 deletions podman.md
    Original 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
    ```