Skip to content

Instantly share code, notes, and snippets.

@mt40
Last active October 17, 2021 04:56
Show Gist options
  • Save mt40/59549507566efb129052e32e2e50e164 to your computer and use it in GitHub Desktop.
Save mt40/59549507566efb129052e32e2e50e164 to your computer and use it in GitHub Desktop.
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release \
vim
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
echo "Please edit /lib/systemd/system/docker.service to have the following line:"
echo "'ExecStart=/usr/bin/dockerd -H fd:// -H=unix:// --containerd=/run/containerd/containerd.sock'"
echo "Then run:"
echo "> sudo systemctl daemon-reload"
echo "> sudo service docker restart"
echo "add your current user" $(whoami) "to group docker"
sudo usermod -aG docker $(whoami)
echo "Make sure to give ownership to group docker for your code folders on this server!"
echo "DONE"
echo "Check out this sample project with remote Python interpreter:"
echo "https://github.com/mt40/remote_docker_test"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment