20 lines
628 B
Bash
20 lines
628 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
sudo apt install -y uidmap fuse-overlayfs slirp4netns rootlesskit
|
||
|
|
||
|
if ! grep -q '/usr/share/docker.io/contrib' "$HOME/.profile" > /dev/null; then
|
||
|
echo 'export PATH="/usr/share/docker.io/contrib:$PATH"' >> "$HOME/.profile"
|
||
|
fi
|
||
|
|
||
|
if ! grep -q 'DOCKER_HOST' "$HOME/.profile" > /dev/null; then
|
||
|
echo "export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock" >> "$HOME/.profile"
|
||
|
fi
|
||
|
|
||
|
sudo loginctl enable-linger "$USER"
|
||
|
|
||
|
PATH="/usr/share/docker.io/contrib:$PATH" dockerd-rootless-setuptool.sh install
|
||
|
|
||
|
echo '{"storage-driver": "fuse-overlayfs"}' > "$HOME/.config/docker/daemon.json"
|
||
|
|
||
|
systemctl --user enable --now docker
|