Difficulty: Beginner
Estimated Time: 10 minutes

In this scenario, you will run advanced docker commands. This development environment has access to latest version of the Docker Engine via a machine called docker.

  • Running docker container.
  • Stop docker containers.
  • Run Jekins WebServer.
  • Attach volume to Jekins container.

What Is Docker?

Docker describes themselves as "an open platform for developers and sysadmins to build, ship, and run distributed applications".

Docker allows you to run containers. A container is a sandboxed process running an application and its dependencies on the host operating system. The application inside the container considers itself to be the only process running on the machine while the machine can run multiple containers independently.

In this scenario we explored how to run containers in interactive and detached mode using docker with custom name and image tag.

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Advanced Docker Run Commands

Step 1 of 7

Step 1 - Running A Container In The Foreground

To run docker image, execute the following code: docker run -it centos bash

Using docker run -it centos bash allows you to get access to a bash shell inside of a container. You can use this shell to run linux commands.

To get OS version information, execute following command cat /etc/*release*

You can exit container by executing following command exit