ewolff / microservice

Sample of a Microservice setup for my book. Based on Spring Cloud / Netflix / Java / Docker / Docker Compose / Docker Machine / Vagrant
Apache License 2.0
725 stars 352 forks source link

Modified Dockerfile to make java the root process #16

Closed aheusingfeld closed 7 years ago

aheusingfeld commented 7 years ago

I modified the Dockerfile to make sure that java is executed as the root process within the docker container. The reason behind this is beforehand java was running as a subprocess of the shell which meant that the java process didn’t receive the kill signal when the docker container was stopped. This could leave java processes as zombies.

Additionally I introduced a shell script which enables us to provide additional configuration options via the following optional env variables:

ewolff commented 7 years ago

While this is a good idea it is actually different from the listing in the book and might therefore confuse readers. Also it only covers one of the services. I would therefore not merge it for the time being, might be different if there is a 2nd edition of the book.

Can you