-
Notifications
You must be signed in to change notification settings - Fork 369
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
Make intermediate images share more common layers #5960
Conversation
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.
LGTM, thanks.
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.
LGTM
# Disable CGO for antctl in case it is copied outside of the container image. It | ||
# also reduces the size of the binary and aligns with how we distribute antctl | ||
# in release assets. | ||
RUN --mount=type=cache,target=/go/pkg/mod/ \ | ||
--mount=type=cache,target=/root/.cache/go-build/ \ | ||
CGO_ENABLED=0 make antctl-linux && mv bin/antctl-linux bin/antctl | ||
|
||
RUN --mount=type=cache,target=/go/pkg/mod/ \ |
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.
nit: a comment would be nice to explain that we build antrea-agent
and antrea-cni
first in order to share an extra layer with build/images/Dockerfile.build.agent.ubuntu
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.
done, also made same changes to coverage and ubi images.
By sharing more common layers, the total time can be reduced about 15s. Signed-off-by: Quan Tian <[email protected]>
/test-all |
By sharing more common layers, the total time can be reduced about 15s.