Skip to content

Basic MCCCS docker commands

Dr. Christian Klukas edited this page Jan 3, 2017 · 9 revisions

Download current docker image

docker pull klukas/mcccs

Create and start MCCCS container (runnable instance)

A docker container is an 'instance' of the docker image, which can be used for execution and data extraction.

Use the following command to create and start an container:

docker run -it --name mcccs klukas/mcccs /bin/bash

You may exit the container by closing the bash console using the command exit.

Start and connect to existing container

Use the following command to start the container and to connect to it via a bash terminal Interface:

docker start -ai mcccs

You may exit the container by closing the bash console using the command exit.

Start another process in a running container

You may investigate the running processes (e.g. operation status of the MCCCS scripts), by connecting a second time to the container and then by starting e.g. top:

docker exec -it mcccs /bin/bash

Within the bash terminal start top

Stop container

docker stop mcccs

Extract MCCCS startup-scripts

MCCCS (and IAP) are automatically compiled from the current GitHub sourcecode. The docker image may therefore be used to extract the current build (MCCCS JAR) files and MCCCS bash script files using the following command sequence:

  1. docker pull klukas/mcccs
  2. docker create --name copysrc klukas/mcccs
  3. docker cp copysrc:/start .
  4. docker rm copysrc

The 'start' folder containing the MCCCS startup scripts and JAR libraries will be copied to the current folder of your computer.

The 'copysrc' container can't be used in the same way as explained in the other sections of this document, as it is initialized in step 2 in a different way and is not started upon creation. After the desired files have been extracted in step 3, command 4 removes this container accordingly.