Docker
Docker is a container-based software framework for automating the 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 updateapt-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
If you want to enrich your career and become a professional in Docker, then visit Tekslate - a global online training platform: "Docker Training" This course will help you to achieve excellence in this domain.
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 an in-depth understanding of Docker click on: