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

[master] rpm, deb: fix Dockerfile linting issues #1064

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Sep 4, 2024

rpm: fix Dockerfile legacy ENV key value format linting warnings

commit d61915e addressed these warnings
for the deb-based Dockerfiles, but didn't update the rpm ones;

 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 13)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 15)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 16)

deb,rpm: fix Dockerfile default value for ARG linting warnings

The GO_IMAGE build-arg doesn't have a default;

 - InvalidDefaultArgInFrom: Default value for ARG ${GO_IMAGE} results in empty or invalid base image name (line 8)

This is not a real issue when building using the Makefiles (which is how
these Dockerfiles are expected to be used) but we can probably set a
default.

This patch sets the default to golang:latest to pick the latest version,
which should be fine for this (until we get a linter recommending not
to use :latest).

@thaJeztah thaJeztah self-assigned this Sep 4, 2024
commit d61915e addressed these warnings
for the deb-based Dockerfiles, but didn't update the rpm ones;

     - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 13)
     - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 15)
     - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 16)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The `GO_IMAGE` build-arg doesn't have a default;

     - InvalidDefaultArgInFrom: Default value for ARG ${GO_IMAGE} results in empty or invalid base image name (line 8)

This is not a real issue when building using the Makefiles (which is how
these Dockerfiles are expected to be used) but we can probably set a
default.

This patch sets the default to `golang:latest` to pick the latest version,
which should be fine for this (until we get a linter recommending not
to use `:latest`).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah marked this pull request as ready for review September 4, 2024 11:35
@thaJeztah thaJeztah changed the title rpm, deb: fix Dockerfile linting issues [master[ rpm, deb: fix Dockerfile linting issues Sep 4, 2024
@thaJeztah thaJeztah changed the title [master[ rpm, deb: fix Dockerfile linting issues [master] rpm, deb: fix Dockerfile linting issues Sep 4, 2024
@vvoland vvoland merged commit 3137193 into docker:master Sep 4, 2024
7 checks passed
@thaJeztah thaJeztah deleted the fix_dockerfile_linting branch September 4, 2024 12: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.

2 participants