Skip to content

Instantly share code, notes, and snippets.

@smartass08
Last active October 3, 2020 22:37
Show Gist options
  • Save smartass08/97b4a579c10bf786d367d43c4ace0ab6 to your computer and use it in GitHub Desktop.
Save smartass08/97b4a579c10bf786d367d43c4ace0ab6 to your computer and use it in GitHub Desktop.
#!/bin/bash
#Add your username here
user=smartass08
#Adds your uid's to subuid and subgid
sudo touch /etc/subuid && sudo touch /etc/subgid
uid=$(id -u $user)
sudo usermod -v $((uid+200000))-$((uid+200000+65535)) -w $((uid+200000))-$((uid+200000+65535)) $user
#Enable unprivileged namespaces in your kernel
sudo sysctl kernel.unprivileged_userns_clone=1
sudo sysctl --system
#Install docker rootless
curl -fsSL https://get.docker.com/rootless | sh
@smartass08
Copy link
Author

systemctl --user [start | status | stop] docker.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment