17 lines
531 B
Bash
Executable file
17 lines
531 B
Bash
Executable file
#!/bin/bash
|
|
|
|
sudo apt install -y uidmap 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
|
|
|
|
systemctl --user enable --now docker
|