Skip to content

chore: fix Dockerfile warnings reported during docker build #1416

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

Merged

Conversation

rohanKanojia
Copy link
Collaborator

What does this PR do?

This PR tries to fix build warnings seen during make docker command invocation:

 2 warnings found (use docker --debug to expand):
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 17)
 - JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals (line 52)
  • Use uppercase keyword in dockerfile as per convention
  • Split long RUN instruction into multiple lines for clarity
  • Use exec form for CMD instruction as done in ENTRYPOINT

What issues does this PR fix or reference?

It doesn't fix any related issue. It's only a minor cleanup task.

Is it tested? How?

Without these changes you'd see the warnings reported above when running make docker.

I've verified that after making changes, I don't see any warnings.

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

- Use uppercase keyword in dockerfile as per convention
- Split long RUN instruction into multiple lines for clarity
- Use exec form for CMD instruction as done in ENTRYPOINT

Signed-off-by: Rohan Kumar <[email protected]>
Copy link

openshift-ci bot commented Apr 21, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@@ -14,7 +14,7 @@
#

# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi9/go-toolset
FROM registry.access.redhat.com/ubi9/go-toolset:9.5-1739267472 as builder
FROM registry.access.redhat.com/ubi9/go-toolset:9.5-1739267472 AS builder

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 2: containerImage not pinned by hash
Remediation tip: pin your Docker image by updating registry.access.redhat.com/ubi9/go-toolset:9.5-1739267472 to registry.access.redhat.com/ubi9/go-toolset:9.5-1739267472@sha256:3403e282d00e6f667822a652fe6b17c0fc5fdb04cc28509eb515381fb8496b39
Click Remediation section below for further remediation help
@rohanKanojia rohanKanojia marked this pull request as ready for review April 28, 2025 14:49
@dkwon17
Copy link
Collaborator

dkwon17 commented Apr 28, 2025

/retest

Copy link

openshift-ci bot commented May 3, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dkwon17, rohanKanojia

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dkwon17 dkwon17 merged commit 9ff4cee into devfile:main May 3, 2025
11 of 12 checks passed
@rohanKanojia rohanKanojia deleted the pr/fix-dockerfile-warnings branch May 3, 2025 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants