forked from lima-vm/lima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
podman.yaml
55 lines (52 loc) · 1.8 KB
/
podman.yaml
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
# Example to use Podman instead of containerd & nerdctl
# $ limactl start ./podman.yaml
# $ limactl shell podman podman run -it --rm -v $HOME:$HOME:ro docker.io/library/alpine
# Hint: To allow `podman` CLI on the host to connect to the Podman daemon running inside the guest, run the following commands:
# $ export CONTAINER_HOST=unix://$HOME/podman.sock
# $ podman ...
# Hint: To allow `docker` CLI on the host to connect to the Podman daemon running inside the guest, run the following commands:
# $ export DOCKER_HOST=unix://$HOME/podman.sock
# $ docker ...
# This example requires Lima v0.7.3 or later
images:
# Hint: run `limactl prune` to invalidate the "current" cache
- location: "https://cloud-images.ubuntu.com/impish/current/impish-server-cloudimg-amd64.img"
arch: "x86_64"
- location: "https://cloud-images.ubuntu.com/impish/current/impish-server-cloudimg-arm64.img"
arch: "aarch64"
mounts:
- location: "~"
writable: false
- location: "/tmp/lima"
writable: true
ssh:
localPort: 60906
containerd:
system: false
user: false
provision:
- mode: system
script: |
#!/bin/bash
set -eux -o pipefail
command -v podman >/dev/null 2>&1 && exit 0
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y podman crun
- mode: user
script: |
#!/bin/bash
set -eux -o pipefail
systemctl --user enable --now podman.socket
probes:
- script: |
#!/bin/bash
set -eux -o pipefail
if ! timeout 30s bash -c "until command -v podman >/dev/null 2>&1; do sleep 3; done"; then
echo >&2 "podman is not installed yet"
exit 1
fi
hint: See "/var/log/cloud-init-output.log". in the guest
portForwards:
- guestSocket: "/run/user/{{.UID}}/podman/podman.sock"
hostSocket: "{{.Home}}/podman.sock"