8
8
# This example requires Lima v0.8.3 or later.
9
9
images :
10
10
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
11
- - location : " https://cloud-images.ubuntu.com/releases/22.04/release-20220420 /ubuntu-22.04-server-cloudimg-amd64.img"
11
+ - location : " https://cloud-images.ubuntu.com/releases/22.04/release-20221201 /ubuntu-22.04-server-cloudimg-amd64.img"
12
12
arch : " x86_64"
13
- digest : " sha256:de5e632e17b8965f2baf4ea6d2b824788e154d9a65df4fd419ec4019898e15cd "
14
- - location : " https://cloud-images.ubuntu.com/releases/22.04/release-20220420 /ubuntu-22.04-server-cloudimg-arm64.img"
13
+ digest : " sha256:8a814737df484d9e2f4cb2c04c91629aea2fced6799fc36f77376f0da91dba65 "
14
+ - location : " https://cloud-images.ubuntu.com/releases/22.04/release-20221201 /ubuntu-22.04-server-cloudimg-arm64.img"
15
15
arch : " aarch64"
16
- digest : " sha256:66224c7fed99ff5a5539eda406c87bbfefe8af6ff6b47d92df3187832b5b5d4f "
16
+ digest : " sha256:8a0477adcbdadefd58ae5c0625b53bbe618aedfe69983b824da8d02be0a8c961 "
17
17
# Fallback to the latest release image.
18
18
# Hint: run `limactl prune` to invalidate the cache
19
19
- location : " https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img"
@@ -58,6 +58,13 @@ provision:
58
58
systemctl restart docker
59
59
# In case a user forgets to set the arch correctly, just install binfmt
60
60
docker run --privileged --rm tonistiigi/binfmt --install all
61
+ # Also ensure that the Lima user has access to the Docker daemon without sudo.
62
+ # The 'right' way to to do this is with the Docker group, but Lima keeps the
63
+ # SSH session around. We don't want users to have to manually delete ~/.lima/$VM/ssh.sock
64
+ # so we're just instead going to modify the perms on the Docker socket.
65
+ # See: https://github.com/lima-vm/lima/issues/528
66
+ chown ${LIMA_CIDATA_USER} /var/run/docker.sock
67
+ chmod og+rwx /var/run/docker.sock
61
68
- mode : system
62
69
script : |
63
70
#!/bin/bash
@@ -81,6 +88,8 @@ provision:
81
88
usermod -aG docker coder
82
89
# Ensure coder listens on all interfaces
83
90
sed -i 's/CODER_ADDRESS=.*/CODER_ADDRESS=0.0.0.0:3000/' /etc/coder.d/coder.env
91
+ # Also set the access URL to host.lima.internal for fast deployments
92
+ sed -i 's#CODER_ACCESS_URL=.*#CODER_ACCESS_URL=http://host.lima.internal:3000#' /etc/coder.d/coder.env
84
93
# Ensure coder starts on boot
85
94
systemctl enable coder
86
95
systemctl start coder
0 commit comments