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

Improve the Dockerfile #26

Merged
merged 3 commits into from
Apr 11, 2022
Merged

Improve the Dockerfile #26

merged 3 commits into from
Apr 11, 2022

Conversation

allanlewis
Copy link
Contributor

This PR proposes some small improvements to the Dockerfile in order to reduce the number of layers and build time, and to avoid polluting the container environment with unnecessary variables.

Since `merge-gatekeeper` is necessarily hard-coded in the entrypoint, there's
little value in extracting it to an environment variable; if we changed it, the
entrypoint wouldn't exist. This commit therefore inlines it.
We don't need `ORG` and `REPO` in the container environment. This commit
therefore redefines them as build arguments. This has the side benefit of being
able to change them at build time, which could be useful for people using forks
of this repo.
In order to reduce the number of image layers, this commit combines some
environment variable definitions into a single step.
Copy link
Contributor

@rytswd rytswd left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the update!

@rytswd rytswd merged commit 94e9047 into upsidr:main Apr 11, 2022
@allanlewis allanlewis deleted the improve-dockerfile branch April 11, 2022 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants