task #6522
Updated by Andreas Kohlbecker over 5 years ago
for easier distribution of the cdm-server it would be advantageous to package the cdm-server into a docker container.
Potentially useful information:
* [DZone - Java Inside Docker: What You Must Know to Not FAIL](https://dzone.com/articles/java-inside-docker-what-you-must-know-to-not-fail)
* [DZone - JVM Advent Calendar: Docker and the JVM](https://dzone.com/articles/jvm-advent-calendar-docker-and-the-jvm)
On creating docker containers with maven:
* https://jaxenter.de/docker-mit-maven-steuern-20211
* https://github.com/fabric8io/shootout-docker-maven
The [fabric8io/docker-maven-plugin](https://github.com/fabric8io/docker-maven-plugin) seems to the the most mature and suitable plugin.
On configuring containers and images via ENV and ARGS, etc: https://vsupalov.com/docker-arg-env-variable-guide
On running a container as a system service, restart policies etc.
* https://docs.docker.com/config/containers/start-containers-automatically : A) --restart flag when using the docker run command B) --live-restore flag of the dockerd command, C) Use a process manager
* https://docs.docker.com/engine/reference/run/#restart-policies---restart
* https://docs.docker.com/config/containers/live-restore/
==> we should use
~~~
docker run -dit --restart unless-stopped
~~~
* -d, --detach : Run container in background and print container ID
* -i, --interactive: Keep STDIN open even if not attached
* -t, --tty: Allocate a pseudo-TTY
* --restart unless-stopped: Restart the container unless it is explicitly stopped or Docker itself is stopped or restarted.