Consider exec form ENTRYPOINT for Dockerfile

Open Beginner friendly
#819 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
docker
Domain
devops

Research direction

Inspect installers/docker/Dockerfile at the ENTRYPOINT on line 25, then compare its current behavior with Docker's shell and exec forms. Verify the change by running the image with an additional command-line flag, including the motivating migration flag, and confirm that the default arguments and environment-variable handling still work.

Written by the indexing model from the issue text.

Description

enhancement help wanted

The grate Dockerfile uses the shell form of ENTRYPOINT:

https://github.com/grate-devs/grate/blob/6226b28d22f962ab8ca264575b124a04ea7fadf7/installers/docker/Dockerfile#L25

The shell form of ENTRYPOINT ignores any CMD or docker run command line arguments, which means that users running grate via Docker can't easily add extra command line flags to the ones that are executed by default. By contrast, Command line arguments to docker run <image> will be appended after all elements in an exec form ENTRYPOINT. As a result, switching to the exec form of ENTRYPOINT would enable users to concisely add additional flags to the normal command, with all of its arguments and reading of env vars.

As a motivating example, it would allow easily adding --warnandignoreononetimescriptchanges to enable editing already-run migrations that are under development, without the user needing to manually delete rows from the grate.ScriptsRun table.

P.S. Thanks for grate!

Dominant language
C#
Stars
297
Forks
56
Avg merge
18m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from grate-devs/grate

All issues in grate-devs/grate

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.