Open9

colima

Yoshiharu SuzukiYoshiharu Suzuki

デフォルトのqemuベースだとmountTypeがsshfsで、それだとvolumeのマウントのchownでpermission deniedになる。virtiofsベースのvzならそこはクリアできる。

❯ colima start --vm-type vz
INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0000] creating and starting ...                     context=vm
INFO[0151] provisioning ...                              context=docker
INFO[0151] starting ...                                  context=docker
INFO[0152] done
Yoshiharu SuzukiYoshiharu Suzuki
❯ colima status
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] socket: unix:///Users/suzuki.yoshiharu/.colima/default/docker.sock

~
❯ colima list
PROFILE    STATUS     ARCH       CPUS    MEMORY    DISK     RUNTIME    ADDRESS
default    Running    aarch64    4       8GiB      60GiB    docker

~
❯ colima version
colima version 0.6.8
git commit: 9b0809d0ed9ad3ff1e57c405f27324e6298ca04f

runtime: docker
arch: aarch64
client: v25.0.2
server: v24.0.9
Yoshiharu SuzukiYoshiharu Suzuki
~
❯ which docker
/usr/local/bin/docker

~
❯ which docker-compose
/opt/homebrew/bin/docker-compose
Yoshiharu SuzukiYoshiharu Suzuki
~
❯ brew info docker-compose
==> docker-compose: stable 2.24.5 (bottled), HEAD
Isolated development environments using Docker
https://docs.docker.com/compose/
/opt/homebrew/Cellar/docker-compose/2.23.3 (6 files, 55.6MB) *
  Poured from bottle using the formulae.brew.sh API on 2023-12-26 at 10:34:29
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/d/docker-compose.rb
License: Apache-2.0
==> Dependencies
Build: go ✘
==> Options
--HEAD
	Install HEAD version
==> Caveats
Compose is now a Docker plugin. For Docker to find this plugin, symlink it:
  mkdir -p ~/.docker/cli-plugins
  ln -sfn /opt/homebrew/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose
==> Analytics
install: 31,199 (30 days), 70,801 (90 days), 230,607 (365 days)
install-on-request: 31,158 (30 days), 70,737 (90 days), 230,381 (365 days)
build-error: 5 (30 days)
Yoshiharu SuzukiYoshiharu Suzuki

docker for macではこのへんがよしなに入る。依存しているものはなんとかしないと。

~/.docker/cli-plugins
❯ ls
docker-buildx    docker-debug     docker-extension docker-init      docker-scan
docker-compose   docker-dev       docker-feedback  docker-sbom      docker-scout
Yoshiharu SuzukiYoshiharu Suzuki

colima + docker for mac(client)は動いた。
docker for mac を外して動くかがまだ不明。

Yoshiharu SuzukiYoshiharu Suzuki

結局これぐらいのスペックにした。

❯ colima start --vm-type vz --cpu 4 --memory 8