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

BUG: COPY --chmod=0755 /usr/local/bin/{python3-login,repo2docker-entrypoint} for rootless podman #1395

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

westurner
Copy link

@westurner westurner commented Jan 15, 2025

BUG: COPY --chmod=0755 /usr/local/bin/{python3-login,repo2docker-entrypoint} for rootless podman

Command this is building with (though repo2podman doesn't yet support volumes)

repo2docker --engine=podman -E -P --debug -e NB_USER=jovyan -e NB_UID=1000 --user-name=jovyan .

Error message this solves for:

$ podman run  --rm -it -p 8888:8888 --security-opt=label=disable localhost/r2d-2e1736805636:latest
/bin/bash: /usr/local/bin/python3-login: Permission denied

…ypoint} to support rootless podman

Command this is building with (though repo2podman doesn't yet support volumes)

```sh
repo2docker --engine=podman -E -P --debug -e NB_USER=jovyan -e NB_UID=1000 --user-name=jovyan .
```
@westurner westurner changed the title BUG: COPY --chmod=0755 /usr/local/bin/{python3-login,repo2docker-entrypoint for rootless podman BUG: COPY --chmod=0755 /usr/local/bin/{python3-login,repo2docker-entrypoint} for rootless podman Jan 15, 2025
@westurner
Copy link
Author

westurner commented Jan 15, 2025

https://github.com/jupyterhub/repo2docker/actions/runs/12789217532/job/35652155178?pr=1395 ::

FAILED tests/base/node/verify::build - repo2docker.engine.BuildError: the --chmod option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled

https://docs.docker.com/go/buildkit/ ::

DOCKER_BUILDKIT=1 docker build .

or modify /etc/docker/daemon.json and restart docker

{
  "features": {
    "buildkit": true
  }
}

Workaround: Instead of having to enable buildkit to COPY --chmod (in 2024), add this:

USER root
RUN chmod 0755 /usr/local/bin/python3-login /usr/local/bin/repo2docker-entrypoint
USER ${NB_USER}

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.

1 participant