Last active
December 31, 2016 12:03
-
-
Save marcio-azevedo/1454d0e1f3cf74c755419423ae0cdfd4 to your computer and use it in GitHub Desktop.
Docker Commands Cheat Sheet for Ubuntu Xenial 16.04 (LTS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Docker on Ubuntu Xenial 16.04 (LTS) | |
# based on https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
# Prerequisites | |
# make sure Kernel version is (at least) 3.10 | |
# $ uname -r | |
# Update your apt sources | |
sudo apt-get update | |
sudo apt-get install apt-transport-https ca-certificates | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
# for Ubuntu Xenial 16.04 (LTS) | |
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list | |
sudo apt-get update | |
# pick one from $ apt-cache policy docker-engine | |
apt-cache policy docker-engine | |
sudo apt-get update | |
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual | |
# -------------- # | |
# Install docker # | |
# -------------- # | |
sudo apt-get update | |
sudo apt-get install docker-engine | |
# run docker | |
sudo service docker start | |
# This command downloads a test image and runs it in a container. When the container runs, it prints an informational message. Then, it exits. | |
sudo docker run hello-world | |
# update | |
sudo apt-get upgrade docker-engine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment