Last active
November 5, 2018 12:59
-
-
Save ancs21/36f652e09c4385ae36e5dc6730f7088a to your computer and use it in GitHub Desktop.
Install Docker on Ubuntu 16.04
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
sudo docker run --name some-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=yourpassword -d mysql | |
# execute | |
sudo docker exec -it some-mysql sh |
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
# 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