From 8b676ff2a2e0c12fe18a7aefe2ce74943c8a70c2 Mon Sep 17 00:00:00 2001 From: Gayle <9532712+flowy0@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:01:43 +0800 Subject: [PATCH] Update replacing_docker_desktop.md --- replacing_docker_desktop.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/replacing_docker_desktop.md b/replacing_docker_desktop.md index 73b9e07..0ce2ab5 100644 --- a/replacing_docker_desktop.md +++ b/replacing_docker_desktop.md @@ -22,7 +22,7 @@ brew install docker-credential-helper Setup engine as dockerd -![image](https://github.com/flowy0/UsefulStuff/assets/9532712/6d623874-9aab-4edf-ba42-e010858995df) +![image](https://github.com/flowy0/UsefulStuff/assets/9532712/6d623874-9aab-4edf-ba42-e010858995df){width=600} `docker context use rancher-desktop` @@ -111,3 +111,37 @@ brew install docker-buildx mkdir -p ~/.docker/cli-plugins ln -sfn /opt/homebrew/opt/docker-buildx/bin/docker-buildx ~/.docker/cli-plugins/docker-buildx ``` + +### Colima with different backend engines + +#### Create multiple docker contexts +```bash +# amd profile +colima start --profile amd --arch amd --cpu 4 --memory 8 --disk 80 + +# default profile +colima start --arch aarch64 --vm-type=vz --vz-rosetta --cpu 4 --memory 12 --disk 80 +``` + +#### Switch docker context +```bash +docker context ls +``` + +Output: +``` +NAME DESCRIPTION DOCKER ENDPOINT ERROR +colima * colima unix:///Users/g/.colima/default/docker.sock +colima-amd colima [profile=amd] +``` + +Switch accordingly +```bash +docker context use colima +#or +docker context use colima-amd + + +``` + +