Docker

The Docker project offers tooling and a runtime for running containerised applications on a host system. We will use Docker to run programs that are prepared for us, without having to install the entire toolchain required to compile, package, install and run the programs.

Installing Docker and getting it to work can be difficult in some cases, but mostly following the general steps from the installation guide should be enough. Docker also provides GUI tooling for some operating systems, which allows you to inspect and modify the state of Docker itself and the containers running on your system.

Using Podman instead of Docker

These preparations assume the usage of Docker to run containerised applications. It’s the go to tool for many developers and organisations when it comes to containers and is most likely to be familiar. There are alternatives to Docker, such as Podman, which allow you to do the same things.

For the purposes of the training, you can probably also use Podman instead, if you prefer to do so. Just replace the commands provided with podman where the docker executable is referenced, because the commands are compatible. The technical parts of the training were only partly tested with Podman, but we’ll only be using the basic commands, so you should be okay!

More information about Podman and how to install it is available online.

Check the Installation

If you have Docker on your computer, the following command in your terminal application should show you the version of Docker that is installed.

$ docker -v

If the program cannot be found on your computer, install it using the instructions from the website. You may also get an error that the Docker daemon isn’t running. In that case, Docker is installed, but not ready to execute commands. Start the Docker Desktop app or on Linux, the Docker service and retry the command.

Docker can download (pull) container images to your computer and run them for you. Let’s start by using this option, which uses a publicly available image.

Perform the following command in your terminal application.

$ docker run -d -p 8888:80 docker/getting-started

This will pull the getting-started image from the public Docker registry and create a copy on your computer. Then this image will be started as a container and make a server available on port 8888.

Test the server with curl.

$ curl -I http://localhost:8888

The -I flag is used to just show the headers of the response instead of the body. The output will look something like this:

HTTP/1.1 200 OK
Server: nginx/1.21.6
Date: Mon, 11 Apr 2022 15:49:23 GMT
Content-Type: text/html
Content-Length: 8697
Last-Modified: Mon, 11 Apr 2022 15:23:07 GMT
Connection: keep-alive
ETag: "625447db-21f9"
Accept-Ranges: bytes

You can stop the running container by executing the following commands.

$ docker ps

This will show the running containers, one of which is based on the image docker/getting-started. Copy the value of that container that is in the CONTAINER ID field. In the example output below, that value is 212b964ec3f2.

Example Output for docker ps
CONTAINER ID   IMAGE                    COMMAND                  CREATED             STATUS             PORTS                               NAMES
212b964ec3f2   docker/getting-started   "/docker-entrypoint.…"   About an hour ago   Up About an hour   0.0.0.0:8888->80/tcp, :::8888->80/tcp   inspiring_villani

Now you can use the container’s ID to stop it.

Stopping the Container
$ docker stop 212b964ec3f2

Running another docker ps command should show the container is no longer running.

Pre-Download Image

As a final step, you can pull another image to your computer with Docker. This image will be used during the training. Downloading it beforehand will save the download time during the training and help to prevent the network to slow down if all participants try it around the same time 😉.

Camunda Platform Run is a distribution of the process and decision automation platform offered by Camunda, conveniently packaged as a Docker image ready to be run.

We’ll be using the Enterprise Edition of Camunda in this training. It’s not publicly available without authenticating, so we’ll need to do that first.

You have received a message (separately) with important information for using Camunda Enterprise Edition. The message contains a username/password combination and a licence key. The username and password should be used in the following instructions. Keep a hold of the message with the licence key for during the training; we’ll need it then.

Log in to Camunda’s Docker registry with the username and password that you received with the following command in your terminal.

docker login registry.camunda.cloud

You’ll be prompted for the username, then for the password. Copy and paste them into the terminal one by one and press Enter each time.

Now pull and run the Docker image for Camunda Platform Run (Enterprise Edition) from the command line.

docker pull registry.camunda.cloud/cambpm-ee/camunda-bpm-platform-ee:7.20.4

That’s all for preparing Docker. We’ll look into using the Camunda image you just downloaded during the training.