Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: persists network user data #211

Merged
merged 2 commits into from
Feb 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions finch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,25 @@ provision:
script: |
#!/bin/bash
sudo chown $USER /mnt/lima-finch
mkdir -p /mnt/lima-finch/containerd
mkdir -p /mnt/lima-finch/nerdctl
mkdir -p ~/.local/share/nerdctl

# https://github.com/containerd/nerdctl/blob/cffdf87ff4d648a5344eea1406bb95ca3ad7eaa4/extras/rootless/containerd-rootless.sh#L144-L146
# XDG_DATA_HOME & ~/.local/share: https://github.com/containerd/nerdctl/blob/cffdf87ff4d648a5344eea1406bb95ca3ad7eaa4/extras/rootless/containerd-rootless.sh#L51
mkdir -p /mnt/lima-finch/containerd ~/.local/share/containerd
sudo mount --bind /mnt/lima-finch/containerd ~/.local/share/containerd

# https://github.com/containerd/nerdctl/blob/main/docs/dir.md#dataroot
mkdir -p /mnt/lima-finch/nerdctl ~/.local/share/nerdctl
sudo mount --bind /mnt/lima-finch/nerdctl ~/.local/share/nerdctl

# https://github.com/containerd/nerdctl/blob/main/docs/dir.md#netconfpath
mkdir -p /mnt/lima-finch/cni-config ~/.config/cni
sudo mount --bind /mnt/lima-finch/cni-config ~/.config/cni

# https://github.com/containerd/nerdctl/blob/cffdf87ff4d648a5344eea1406bb95ca3ad7eaa4/extras/rootless/containerd-rootless.sh#L148-L150
# XDG_DATA_HOME & ~/.local/share: https://github.com/containerd/nerdctl/blob/cffdf87ff4d648a5344eea1406bb95ca3ad7eaa4/extras/rootless/containerd-rootless.sh#L51
mkdir -p /mnt/lima-finch/cni-local ~/.local/share/cni
sudo mount --bind /mnt/lima-finch/cni-local ~/.local/share/cni

systemctl --user restart containerd.service

# Probe scripts to check readiness.
Expand Down