Group Discounts available for 3+ students and Corporate Clients

How to install Docker

Docker is a container-based software framework for automating deployment of applications. “Containers” are encapsulated, lightweight, and portable application modules.

Docker was only available on Ubuntu. Nowadays, it is possible to deploy docker on RHEL based systems (e.g. CentOS) and others as well.

Installation of Docker

Install Docker by installing the docker-io package:

apt-get update

apt-get -y install docker.ioLink and fix paths with the following two commands:
ln -sf /usr/bin/docker.io /usr/local/bin/docker
sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io

Configure Docker to start when the server boots:

update-rc.d docker.io defaults
Interested in mastering Docker Training? Enroll now for FREE demo on Docker Training.

Download a Docker Container

Download the fedora Docker image

docker pull ubuntu

Run a Docker Container

-To set up a basic ubuntu container with a bash shell, we just run one command.

-docker run will run a command in a new container, -i attaches stdin and stdout, -t allocates a tty, and we’re using the standard ubuntu container.

docker run -i -t ubuntu /bin/bash

To disconnect from the shell without exiting use the escape sequence Ctrl-p + Ctrl-q.

For indepth understanding of Docker click on

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on How to install Docker"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Support


    Please Enter Your Details and Query.
    Three + 6