Project

General

Profile

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. 


 Docker doc: 

 * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 
 * [Docker Getting Startet](https://docs.docker.com/get-started/) 
     * [Bind mounts](https://docs.docker.com/storage/bind-mounts/) 
 * [Docker Compose](https://docs.docker.com/compose/) 
     * [Compose File Reference#restart](https://docs.docker.com/compose/compose-file/#restart) 

 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. 

 ## Deployment 

 to https://hub.docker.com 

 **Organization for the EDIT Platform:** 

 https://cloud.docker.com/u/cybertaxonomy/ 

 * organization name: cybertaxonomy 
 * owners: 
    * kohlbecker 
 * repository: cdm-server 
 * team : editdev  
     * members (so far): kohlbecker 

 The cdm-server image is available from https://hub.docker.com/r/cybertaxonomy/cdm-server/ 





Back