Setting up Docker

Docker is a software technology which provides the use of containers which is kind of a light form of virtual machines. It’s used quite a bit in DevOps to setup development environments along with a variety of other uses. In addition to Docker, we’re going to be using Docker Compose which is used for running multi-container environment. For DevOps Bootcamp, we’re going to be using Docker in a variety of ways from acting as a simple Linux machine, to hosting applications.

Installing Docker

Docker can be installed on Windows, Mac and a variety of Linux operating systems (Ubuntu, Debian, CentOS, Fedora). Please be sure you read the installation instructions closely to ensure your system supports running Docker and has the needed BIOS features enabled. If you have any trouble getting it installed, feel free to ask in our Slack channel.

Installing Docker Compose

Docker Compose can be installed on Windows, Mac and a variety of Linux operating systems. Please read the installation instructions for your platform carefully.

Running the DOBC image

First you need you need to clone the Bootcamp-Exercises repository:

$ git clone https://github.com/DevOpsBootcamp/Bootcamp-Exercises.git

Once you have Docker and Docker Compose installed and running and also have the Bootcamp-Exercises repository cloned, you can spin up a Docker image we’ve created for DOBC by running the following from the root of the repository directory:

$ cd Bootcamp-Exercises
$ docker-compose up -d
$ docker-compose run -p 8080:8080 dobc bash

You can log out by typing exit and then enter which will stop the container.

Stopping the container

To stop the container, run the following:

$ docker-compose kill
$ docker-compose rm --all