Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(model-server)!: Use ENTRYPOINT instead of CMD in the provided Docker image #391

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

odzhychko
Copy link
Contributor

@odzhychko odzhychko commented Jan 3, 2024

This follows best practices for Docker images.

You can use the exec form of ENTRYPOINT to set fairly stable default commands and arguments and then use either form of CMD to set additional defaults that are more likely to be changed.
See https://docs.docker.com/engine/reference/builder/#exec-form-entrypoint-example

Using a ENTRYPOINT in model-server docker container makes passing arguments easier.
For example,
docker run modelix/model-server ./run-model-server.sh -inmemory
would be simplified to
docker run modelix/model-server -inmemory

BREAKING CHANGE: The previous entry point was the default ENTRYPOINT ["/bin/sh", "-c"].
Now it is ENTRYPOINT ["./run-model-server.sh"].
If you used docker run modelix/model-server ./run-model-server.sh <args> to pass arguments,
you now have to use docker run modelix/model-server <args>.
If you used any other process, you now have to override the entry point with the --entrypoint option.
See https://docs.docker.com/engine/reference/run/#entrypoint-default-command-to-execute-at-runtime

@odzhychko odzhychko requested a review from slisson as a code owner January 3, 2024 15:33
@odzhychko odzhychko requested a review from a team January 3, 2024 15:34
@odzhychko
Copy link
Contributor Author

Currently, we have no documentation about the arguments of the model server and the docker container.
We have this issue for this.

Copy link
Contributor

@languitar languitar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In your commit message, you can use the BREAKING CHANGE trailer to explain what is breaking and how users get around it. That text goes into the changelog.

See here for an example: https://www.conventionalcommits.org/en/v1.0.0/#commit-message-with-description-and-breaking-change-footer

…cker image

This follows best practices for Docker images.
> You can use the exec form of ENTRYPOINT to set fairly stable default commands and arguments and then use either form of CMD to set additional defaults that are more likely to be changed.
See https://docs.docker.com/engine/reference/builder/#exec-form-entrypoint-example

Using a ENTRYPOINT in model-server docker container makes passing arguments easier.
For example,
`docker run modelix/model-server ./run-model-server.sh -inmemory`
would be simplified to
`docker run modelix/model-server -inmemory`

BREAKING CHANGE: The previous entry point was the default `ENTRYPOINT ["/bin/sh", "-c"]`.
 Now it is `ENTRYPOINT ["./run-model-server.sh"]`.
 If you used `docker run modelix/model-server ./run-model-server.sh <args>` to pass arguments,
 you now have to use `docker run modelix/model-server <args>`.
 If you used any other process, you now have to override the entry point with the `--entrypoint` option.
 See https://docs.docker.com/engine/reference/run/#entrypoint-default-command-to-execute-at-runtime
@odzhychko odzhychko merged commit bb767e6 into main Jan 8, 2024
13 checks passed
@odzhychko odzhychko deleted the MODELIX-534 branch January 8, 2024 14:44
@slisson
Copy link
Member

slisson commented Jan 9, 2024

🎉 This PR is included in version 4.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants