Skip to content

Conversation

@westurner
Copy link
Contributor

@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

@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
Contributor 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}

@minrk
Copy link
Member

minrk commented Feb 21, 2025

Now that we use buildx, we can use the simpler version with --chmod, I think

@minrk minrk changed the title BUG: COPY --chmod=0755 /usr/local/bin/{python3-login,repo2docker-entrypoint} for rootless podman COPY --chmod=0755 /usr/local/bin/{python3-login,repo2docker-entrypoint} for rootless podman Dec 8, 2025
…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 .
```
@minrk minrk merged commit 9c50d4d into jupyterhub:main Dec 8, 2025
21 checks passed
@westurner
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants