-
Notifications
You must be signed in to change notification settings - Fork 654
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
Update Dockerfile #5926
base: master
Are you sure you want to change the base?
Update Dockerfile #5926
Conversation
these changes help make the build faster by optimizing Docker's layer caching Setting TARGETARCH=amd64 as a default ensures that the build does not fai Signed-off-by: Priyanshu Prajapati <[email protected]>
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
@davidmirror-ops can you check the pr and merge it |
Signed-off-by: Priyanshu Prajapati <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5926 +/- ##
==========================================
- Coverage 36.84% 36.66% -0.19%
==========================================
Files 1309 1241 -68
Lines 130967 127548 -3419
==========================================
- Hits 48252 46761 -1491
+ Misses 78531 76763 -1768
+ Partials 4184 4024 -160
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@eapolinario is this dockerfile still used? Should we go through the bundled dockerfile sometime and see if the base images there need to be updated? |
docker/sandbox-bundled/Dockerfile
Outdated
# Set architecture with a default fallback | ||
ARG TARGETARCH=amd64 | ||
ENV TARGETARCH "${TARGETARCH}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not change, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improved caching mechanism for Go modules by separating the go mod download step from the build process.
You mention the above in the PR description, but I don't see this change in the PR. Can you clarify?
docker/sandbox-bundled/Dockerfile
Outdated
FROM --platform=${BUILDPLATFORM} mgoltzsche/podman:minimal AS builder | ||
|
||
ARG TARGETARCH | ||
# Set architecture with a default fallback | ||
ARG TARGETARCH=amd64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs mention that TARGETARCH
is one of the pre-defined arguments in buildkit contexts, so no need to define this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check it now
docker/sandbox/Dockerfile
Outdated
@@ -1,4 +1,5 @@ | |||
FROM alpine:3.13.5 AS base | |||
FROM alpine:latest AS base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use an explicit version, e.g. 3.20.3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I agree with @eapolinario
Signed-off-by: Priyanshu Prajapati <[email protected]>
Signed-off-by: Priyanshu Prajapati <[email protected]>
these changes help make the build faster by optimizing Docker's layer caching Setting TARGETARCH=amd64 as a default ensures that the build does not fai
Summary of Changes
TARGETARCH=amd64
).go mod download
step from the build process.## BackgroundThe previous Dockerfiles used an outdated Alpine version (3.13.5), which may lack important security updates and features. The updates aim to enhance performance, ensure compatibility with the latest dependencies, and improve overall security.
Why are the changes needed?
alpine:latest
to ensure we are using the most recent stable version with the latest security patches and improvements.What changes were proposed in this pull request?
Summary of Changes
alpine:latest
.wget
,bash
).How was this patch tested?
Testing Environment
Setup process
Screenshots
Check all the applicable boxes
Docs link