Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
docker set up in ubuntu
#!/bin/sh
# This script is from the tutorial of set docker in ubuntu server, further info https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#next-steps
# This usually fail in aws ubuntu linux because is no extra packages in aws linux
sudo apt-get install \
linux-image-extra-$(uname -r) \
linux-image-extra-virtual
sudo apt-get update
# Allow to use apt over https
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
# install the latest docker accoarding ubuntu distribution for amd64 architecture
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce
# Now docker is installed up and running to use without sudo....
sudo groupadd docker
sudo usermod -aG docker $USER
# Log out and enter again, you should be able to run docker run hello-world without sudo command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.