Skip to content

Instantly share code, notes, and snippets.

@ancs21
Last active November 5, 2018 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ancs21/36f652e09c4385ae36e5dc6730f7088a to your computer and use it in GitHub Desktop.
Save ancs21/36f652e09c4385ae36e5dc6730f7088a to your computer and use it in GitHub Desktop.
Install Docker on Ubuntu 16.04
sudo docker run --name some-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=yourpassword -d mysql
# execute
sudo docker exec -it some-mysql sh
# downloads and add the GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# add the docker repository to apt sources
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# update the package database with the docker packages
sudo apt-get update
# sure install from the Docker repo instead of the default Ubuntu 16.04 repo
apt-cache policy docker-ce
# install docker
sudo apt-get install -y docker-ce
# check status docker daemon
sudo systemctl status docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment