Set up repository to install dependent package for Docker installation
Update the apt package index
If you need to uninstall Docker installed
Helpful links
https://docs.docker.com/get-started/#conclusion-of-part-one
https://github.com/docker/labs/tree/master/beginner/
sudo apt-get update
Install packages to allow apt to use a repository over HTTPS:
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
To Verify the key with the fingerprint by matching the last 8 characters of the fingerprint.
sudo apt-key fingerprint 0EBFCD88
Set up the stable repository
I have chosen stable repository and x86_64/amd64. For different version please follow the link
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
Now to install DockerUpdate the apt package index
sudo apt-get update
Install the latest version of Docker CE
sudo apt-get install docker-ce
To verify that Docker CE is installed correctly by running the hello-world image
sudo docker run hello-world
It will download a test image and run it in a container. When the container runs, it prints an informational message and exits. Now Docker CE is installed and running on your machine.If you need to uninstall Docker installed
sudo apt-get purge docker-ce
To delete all images, containers, and volumes which is not removed automatically
sudo rm -rf /var/lib/docker
If you want to configure Linux as post installation Click the Link.
Some Useful Commands:
To see list of images downloaded image on your machine.
docker image ls
To get help
docker container --help
Next Define your own container with Docker fileHelpful links
https://docs.docker.com/get-started/#conclusion-of-part-one
https://github.com/docker/labs/tree/master/beginner/
No comments:
Post a Comment