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

Ensure that /proc/sys/net is writable #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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: 20 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,26 @@ cat > $mnt/etc/systemd/system/systemd-networkd-wait-online.service.d/override.co
TimeoutSec=10s
EOF

# Ensure that /proc/sys/net is writable to allow Docker to set
# /proc/sys/net/ipv6/conf/*/disable_ipv6. Works around moby/moby#47769 as
# suggested in the Docker Engine 27.0.1 release notes.
cat > $mnt/etc/systemd/system/remount-proc-sys.service <<EOF
[Unit]
Description=Remount /proc/sys as writable
Before=docker.service
ConditionVirtualization=docker
ConditionPathExists=/proc/sys
ConditionPathIsReadWrite=!/proc/sys

[Service]
Type=oneshot
ExecStart=mount --options rw,remount /proc/sys

[Install]
WantedBy=docker.service
EOF
systemctl --root=$mnt enable remount-proc-sys.service

# Generate SSH keys on first boot
cat > $mnt/etc/systemd/system/ssh-hostkey-generate.service <<EOF
[Unit]
Expand Down