Install Docker on Ubuntu 16.04
Install Docker on Ubuntu 16.04
Docker Engine is an open-source containerization technology for building and containerizing your applications. Docker Engine acts as a client-server application with:
Docker Engine is an open-source containerization technology for building and containerizing your applications. Docker Engine acts as a client-server application with:
- A server with a long-running daemon process dockerd.
- APIs which specify interfaces that programs can use to talk to and instruct the Docker daemon.
- A command-line interface (CLI) client docker.
To install Docker on your Ubuntu 16.04 machine, follow the following steps.
- Install Dependent packages: Update the package index and install packages to allow apt to use a repository over HTTPS. sudo apt-get update
- sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
- Add repository key: Add repository key to the package manager curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- Verify fingerprint: Verify that you now have the key with the fingerprint sudo apt-key fingerprint 0EBFCD88
- Add stable repo for docker: Add stable repository and update the package index. sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- Check the package availability: Check availability of the docker-ce package apt-cache madison docker-ce
apt-cache policy docker-ce
- Install the packages: Install docker CE, docker CLI, and containerd.io sudo apt-get install docker-ce docker-ce-cli containerd.io
- Check the docker version and status: Verify the successful installation and the version of the installed package and status of the docker service. docker --version
- sudo systemctl status docker
- Add your user to the docker group: Add your user to the docker group and run su - ${USER} to make it in effect alternatively, you can restart your machine. sudo groupadd docker
su - ${USER}
- Download docker-compose: Download docker-compose and keep it in /usr/local/bin folder. sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- Make it executable: Add execute permission to the downloaded docker-compose file/ sudo chmod +x /usr/local/bin/docker-compose
- Verify installation: Verify the successful installation and the version of the docker-compose docker-compose --version
Comments
Post a Comment