AR ホームベーカリー

オイラのアウトプット用ホームベーカリー!

errors inspecting instance

fargate の起動イメージにしているコンテナの確認したくて、 docker (lima) を立ち上げようとしたらエラーに。

❯ limactl start docker_x86_64
INFO[0000] Using the existing instance "docker_x86_64"
FATA[0000] errors inspecting instance: [failed to get Info from "/Users/donbulinux/.lima/docker_x86_64/ha.sock": Get "http://lima-hostagent/v1/info": dial unix /Users/donbulinux/.lima/docker_x86_64/ha.sock: connect: connection refused]

なんじゃこれ、と思ったらどうもコンテナが壊れているらしい?

qiita.com

-f で強制的に対象を停止してから、改めて起動すれば良いとのこと。

❯ limactl stop -f docker_x86_64
INFO[0000] The qemu driver process seems already stopped
INFO[0000] Sending SIGKILL to the host agent process 2935
INFO[0000] Removing *.pid *.sock under "/Users/donbulinux/.lima/docker_x86_64"
INFO[0000] Removing "/Users/donbulinux/.lima/docker_x86_64/ga.sock"
INFO[0000] Removing "/Users/donbulinux/.lima/docker_x86_64/ha.pid"
INFO[0000] Removing "/Users/donbulinux/.lima/docker_x86_64/ha.sock"

❯ limactl ls
NAME             STATUS     SSH            VMTYPE    ARCH      CPUS    MEMORY    DISK      DIR
docker_x86_64    Stopped    127.0.0.1:0    qemu      x86_64    4       4GiB      100GiB    ~/.lima/docker_x86_64

❯ limactl start docker_x86_64

# snip #

INFO[0080] [hostagent] The final requirement 1 of 1 is satisfied
INFO[0080] READY. Run `limactl shell docker_x86_64` to open the shell.
INFO[0080] Message from the instance "docker_x86_64":
To run `docker` on the host (assumes docker-cli is installed), run the following commands:
------
docker context create lima-docker_x86_64 --docker "host=unix:///Users/donbulinux/.lima/docker_x86_64/sock/docker.sock"
docker context use lima-docker_x86_64
docker run hello-world
------

無事起動した、よかったー。