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

🌱 change casing from as to AS in Dockerfile #1385

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

kranurag7
Copy link
Contributor

this was giving me warning locally and this commit fixes the same. Docker version used locally is 27.0.3

$ docker buildx build -f images/caph/Dockerfile . --check
[+] Building 0.9s (5/5) FINISHED                                                                                                                 docker:default
 => [internal] connecting to local controller                                                                                                              0.0s
 => [internal] load build definition from Dockerfile                                                                                                       0.0s
 => => transferring dockerfile: 1.57kB                                                                                                                     0.0s
 => [internal] load metadata for gcr.io/distroless/static:nonroot                                                                                          0.8s
 => [internal] load metadata for docker.io/library/golang:1.21.6-bullseye@sha256:a8712f27d9ac742e7bded8f81f7547c5635e855e8b80302e8fc0ce424f559295          0.0s
 => [internal] load .dockerignore                                                                                                                          0.0s
 => => transferring context: 252B                                                                                                                          0.0s

WARNING: FromAsCasing - https://docs.docker.com/go/dockerfile/rule/from-as-casing/
'as' and 'FROM' keywords' casing do not match
Dockerfile:16
--------------------
  14 |
  15 |     # Build the manager binary
  16 | >>> FROM --platform=${BUILDPLATFORM} docker.io/library/golang:1.21.6-bullseye@sha256:a8712f27d9ac742e7bded8f81f7547c5635e855e8b80302e8fc0ce424f559295 as build
  17 |     ARG TARGETOS TARGETARCH
  18 |
--------------------

Ref: https://docs.docker.com/reference/build-checks/from-as-casing/ (the casing should be the same)

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squash commits
  • include documentation
  • add unit tests

this was giving me warning locally and this commit fixes the same.
Docker version used locally is 27.0.3

Signed-off-by: kranurag7 <81210977+kranurag7@users.noreply.github.com>
@batistein
Copy link
Contributor

interesting finding! Maybe it makes sense to have this integrated in our linting.

@batistein batistein marked this pull request as ready for review July 16, 2024 11:38
@batistein batistein merged commit 3014bef into syself:main Jul 18, 2024
14 checks passed
@kranurag7 kranurag7 deleted the kr/from-as-casing-warning branch July 18, 2024 09:31
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.

None yet

2 participants