2023-12-05 17:45:59 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-12-08 14:52:26 +01:00
|
|
|
sudo apt install -y uidmap slirp4netns rootlesskit
|
2023-12-05 17:45:59 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
systemctl --user enable --now docker
|