Improve Docker and compose definitions #861
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a PR that contains several improvements of our Docker infra.
Below is a detailed overview of all the changes covered in sections:
We are moving away from the legacy version of compose files. This commit
removes the version key from the compose files as it is obsolete.
See https://docs.docker.com/compose/compose-file/04-version-and-name/
Excerpt from Docker documentation states:
The default path for a Compose file is compose.yaml (preferred) or
compose.yml that is placed in the working directory. Compose also
supports docker-compose.yaml and docker-compose.yml for backwards
compatibility of earlier versions. If both files exist, Compose prefers
the canonical compose.yaml.
This change updates the Dockerfile CMD instructions to use the exec form
instead of the shell form. This is a best practice for Dockerfiles as it
avoids the overhead of running a shell process.
One downside of shell form is that it does not pass signals to the
process. This can cause the process to not shut down cleanly when
stopping the container. The exec form does not have this issue.