Skip to content

Instantly share code, notes, and snippets.

@peteristhegreat
Last active November 22, 2023 15:17
Show Gist options
  • Save peteristhegreat/e5d12104df8390e1f99bb4db24fd6cb6 to your computer and use it in GitHub Desktop.
Save peteristhegreat/e5d12104df8390e1f99bb4db24fd6cb6 to your computer and use it in GitHub Desktop.
Colima 0.4.4 on MacOS, Attempt #2

Back in January, I tried colima and hit a snag on getting onto AWS ECR boxes. It ends up it was probably an issue with not being able to use the existing credentials file and I could have fixed it...

Today (Aug 2022) I am giving it another college try.

brew upgrade colima
ls -l $(which docker)
brew install docker
ln -s /Applications/Docker.app/Contents/Resources/bin/docker /usr/local/bin/docker-desktop
brew link --overwrite docker
brew install docker-credential-helper

colima delete
colima start
colima stop

Helpful blog post:

https://kudulab.io/posts/2022-dojo-colima/

Nerdctl v Docker binary

I haven't tried this but if you want to use containerd 's nerdctl interface instead of the docker binary in brew, it looks like this:

 colima start --runtime containerd
 colima nerdctl install

Then usage is something like:

colima nerdctl run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine

Or better yet for regular terminal usage

echo "alias docker=\'colima nerdctl\'" >> ~/.bash_profile

Or for script usage:

echo '#!/usr/bin/env bash
colima nerdctl "$@"' > /usr/local/bin/docker
chmod u+x /usr/local/bin/docker

ecr get-login-password issues

Error saving credentials: error storing credentials - err: exit status 1, out: `Post "http://ipc/registry/credstore-updated": dial unix /Users/pethya/Library/Containers/com.docker.docker/Data/backend.sock: connect: connection refused`

This thread was helpful:

https://stackoverflow.com/a/72888813/999943

Replace the word desktop for osxkeychain

sed -i'' -e 's|"credsStore": ".*"|"credsStore": "osxkeychain"|g' ~/.docker/config.json

And you should be all set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment