forked from bakueikozo/atomcam_tools_obsolute
-
Notifications
You must be signed in to change notification settings - Fork 25
/
lima-docker.yml
69 lines (58 loc) · 1.7 KB
/
lima-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
vmType: "vz"
rosetta:
enabled: true
binfmt: true
images:
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img"
arch: "x86_64"
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-arm64.img"
arch: "aarch64"
cpus: 8
memory: "12GiB"
disk: "80GiB"
mountType: "virtiofs"
mounts:
- location: "~"
writable: true
- location: "/tmp/lima"
writable: true
containerd:
system: false
user: false
provision:
- mode: system
script: |
#!/bin/bash
set -eux -o pipefail
command -v docker >/dev/null 2>&1 && exit 0
export DEBIAN_FRONTEND=noninteractive
curl -fsSL https://get.docker.com | sh
apt install -y docker-compose
if [ ! -e /etc/systemd/system/docker.socket.d/override.conf ]; then
mkdir -p /etc/systemd/system/docker.service.d/
cat <<EOF > /etc/systemd/system/docker.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H tcp://127.0.0.1:2375
Environment="BUILDKIT_STEP_LOG_MAX_SIZE=134217728"
EOF
systemctl daemon-reload
systemctl restart docker
fi
probes:
- mode: readiness
description: docker to be installed
script: |
#!/bin/bash
set -eux -o pipefail
if ! timeout 30s bash -c "until command -v docker >/dev/null 2>&1; do sleep 3; done"; then
echo >&2 "docker is not installed yet"
exit 1
fi
hint: See "/var/log/cloud-init-output.log". in the guest
hostResolver:
hosts:
host.docker.internal: host.lima.internal
message: |
$ export DOCKER_HOST='tcp://127.0.0.1:2375'
$ export LIMA_INSTANCE={{.Name}}