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

misc: merge chmod into copy in Dockerfile #600

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

SToPire
Copy link
Contributor

@SToPire SToPire commented Jul 2, 2024

Let's use Docker's COPY --chmod feature instead of using a separate chmod command. This will reduce the generated image size by ~12KB.

Fixes: #402

Copy link
Collaborator

@imeoer imeoer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@imeoer
Copy link
Collaborator

imeoer commented Jul 9, 2024

Not sure the broken CI is related with the PR.

Let's use Docker's `COPY --chmod` feature instead of using a separate
chmod command. This will reduce the generated image size by ~12KB.

Fixes: containerd#402

Signed-off-by: Yifan Zhao <[email protected]>
@SToPire
Copy link
Contributor Author

SToPire commented Jul 9, 2024

Sorry for the late reply! It seems that COPY --chmod in Docker buildkit only supports octal notation instead of "+x". [1]

This was my mistake and I've updated the new patch. It looks like the current version could pass the CI correctly.

[1] https://docs.docker.com/reference/dockerfile/#copy

Copy link
Member

@sctb512 sctb512 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@imeoer imeoer merged commit f24f0d9 into containerd:main Jul 11, 2024
16 checks passed
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.

Wasted space in image
3 participants