Skip to content

Instantly share code, notes, and snippets.

@servercharlie
Last active May 18, 2022 12:04
Show Gist options
  • Save servercharlie/23e108914b7343e410ed79e3e5a8e990 to your computer and use it in GitHub Desktop.
Save servercharlie/23e108914b7343e410ed79e3e5a8e990 to your computer and use it in GitHub Desktop.
Docker docker docker..

Docker Curriculum @ https://prakhar.me/docker-curriculum/

Ubuntu Install @ https://docs.docker.com/engine/installation/linux/ubuntu/

Ubuntu Post-Install @ https://docs.docker.com/engine/installation/linux/linux-postinstall/

Docker User Guide @ https://docs.docker.com/engine/userguide/

Install Docker (on Ubuntu 16.10/yak)

# update listings.
sudo apt-get update

# some stuff
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

# some stuff
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

# verify fingerprint
sudo apt-key fingerprint 0EBFCD88
# must be 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88

# add repo
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable edge"

# update again
sudo apt-get update

# install docker
sudo apt-get install docker-ce

# in case you wanna go for production w/ specific version
# list versions by doing
# apt-cache madison docker-ce
# then
# sudo apt-get install docker-ee=<VERSION>

# test it
sudo docker run hello-world

# done

Post-install steps (for Ubuntu 16.10/yak)

### ALLOWING REGULAR USERS TO RUN DOCKER w/o SUDO
# create group (should be created already, i assume)
sudo groupadd docker

# add current user to docker group
sudo usermod -aG docker $USER

# log out, then log back in

# do this test
docker run hello-world
### DONE

### ENABLE DOCKER TO START ON BOOT
sudo systemctl enable docker
sudo systemctl status docker
### DONE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment