Skip to content

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}

@minrk
Copy link
Member

minrk commented Feb 21, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

2 participants