GSA / catalog-app

Development environment for catalog.data.gov
https://catalog.data.gov
Other
20 stars 25 forks source link

Standardize the entrypoint across containers #75

Open adborden opened 6 years ago

adborden commented 6 years ago

Conversation to address the entrypoint for our containers.

adborden commented 6 years ago

IOOS uses phusion/baseimage as their base image which provides a my_init script that acts as a real init process. This allows derivative images to drop init/configuration scripts in /etc/my_init.d for standardized init.

adborden commented 6 years ago

Most of our entrypoints accept a --wait-for-dependencies flag that triggers netcat to look for dependent web services. This is somewhat of an anti-pattern, because in most cases the app should be handling the re-connect, rather than startup script. A manual restart shouldn't be necessary to recover from a connection error.

adborden commented 6 years ago

Entrypoints should end with exec "$@" so that you can pass shell commands to the container. The Dockerfile should contain a default CMD that is appropriate so in most cases you don't need to pass a custom command.