-
Notifications
You must be signed in to change notification settings - Fork 568
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
Erroneous set of rwx permissions on etc and usr directories #1130
Comments
I further investigated, and I noted that the issue is caused still by |
Thanks for reporting. This looks related to BuildKit, not the GitHub action. Building your project with this Dockerfile locally gives the same behavior: FROM athenaos/base:latest
RUN ls -al /
COPY rootfs/ /
RUN ls -al /
Related issue is here: moby/buildkit#3602 |
@crazy-max thanks for the answer. The strange fact is that the mentioned open issue was opened 1 year ago, but I experienced this issue only in the last month... And if I manually build the image, it works correctly. If I use the mentioned GH actions no... Indeed the latest pushed image in docker hub of Athena OS was built locally and you can see that the permissions are set correctly. |
@D3vil0p3r This seems link to a regression since BuildKit 0.13: moby/buildkit#5066 Can you try with: -
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=moby/buildkit:v0.12.5 |
Hey @crazy-max by using your workaround, the permissions are set now correctly. Thank you. I guess that buildkit must fix the issue. |
UPDATE: Below can be ignored. The bug was specific to git context, which was not obvious to me 😓 # NOTE: Due to git context `-f-` is required to use a local Dockerfile for custom build via stdin:
docker buildx build -f- --builder bk-13 --progress plain --no-cache https://github.com/Athena-OS/athena-rdp-docker.git < Dockerfile.local
# Fixed:
docker buildx build -f- --builder bk-15 --progress plain --no-cache https://github.com/Athena-OS/athena-rdp-docker.git < Dockerfile.local @D3vil0p3r you can update to use BuildKit Not reproducible with local build context
I cannot seem to reproduce with any of the following buildx builder drivers:
What I did notice was that whatever permissions I had for the directory or files was copied over. And git checkout would apply a umask if any on the host (unrelated to the docker build), which could result in the files for For the reproduction attempt I cloned Ownership of
At the time of the report the workflow was running with (BuildKit
By the time the June 23rd comment about BuildKit
I am running on similar version of Docker (
|
Contributing guidelines
I've found a bug, and:
Description
I have a docker container as an Arch-based Linux distro. Usually I create the container and I push it by the build-push-action but when I create and push the container by this action, when I pull the image and run the container, the filesystem root has the following permissions:
Look at
etc
andusr
permissions. It creates several issues (like the/etc/sudoers.d
being not working if it is world writable`).When I build the same container locally and I push it by:
and then I run it by
docker run
, the permissions are set correctly.So I have the described issue only when I use docker action. The GitHub workflow I use for it is:
Instructions to run the container are on README of the https://github.com/Athena-OS/athena-rdp-docker repository.
Expected behaviour
/etc
and/usr
directories and some their subdir should have the right permissions, for example:Actual behaviour
The filesystem root has the following permissions:
Repository URL
https://github.com/Athena-OS/athena-rdp-docker
Workflow run URL
https://github.com/Athena-OS/athena-rdp-docker/blob/main/.github/workflows/docker-publish.yml
YAML workflow
Workflow logs
No response
BuildKit logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: