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

How to run on rootless container? #473

Open
anlesk opened this issue Apr 24, 2023 · 3 comments
Open

How to run on rootless container? #473

anlesk opened this issue Apr 24, 2023 · 3 comments

Comments

@anlesk
Copy link
Contributor

anlesk commented Apr 24, 2023

Problem
I'm running podman as my container tool and it works differently than Docker.
When I try to run the container, I got the following:

chown: changing ownership of '/app/working': Operation not permitted
chown: changing ownership of '/app/output': Operation not permitted
chown: changing ownership of '/app/configuration.local.json': Operation not permitted

I've created p2g:p2g user and group with UID 1015 both.
I've created config files and folders as needed and gave them the

Logs if applicable

➜  p2g ls -la
-rw-r--r--   1 p2g       p2g    1401 Apr 24 09:08 configuration.local.json
-rw-r--r--   1 p2g       p2g     270 Apr 24 09:09 deviceInfo.xml
-rw-r--r--   1 p2g       p2g     296 Apr 24 14:03 docker-compose.yaml
drwxr-xr-x   2 p2g       p2g      64 Apr 24 09:04 output
drwxr-xr-x   2 p2g       p2g      64 Apr 24 09:05 working

Installation:

  • OS: mac
  • Method: docker
  • Version: 3.5.0

Additional context
I tried to use podman-compose as well, but it gives similar results.

My docker-compose.yaml file:


services:
  p2g:
    container_name: p2g
    image: philosowaffle/peloton-to-garmin:v3.5.0
    environment:
      - TZ=America/New_York
    volumes:
      - ./configuration.local.json:/app/configuration.local.json
      - ./output:/app/output
      - ./working:/app/working

I have a suspicion that this is due to this: https://github.com/philosowaffle/peloton-to-garmin/blob/master/docker/entrypoint.sh#L4

When I run it as user I got permission denied error:

podman run --user p2g:p2g --userns=keep-id -e TZ=America/New_York -v ./configuration.local.json:/app/configuration.local.json -v ./output:/app/output -v ./working:/app/working philosowaffle/peloton-to-garmin:v3.5.0

{"msg":"exec container process `/app/entrypoint.sh`: Permission denied","level":"error","time":"2023-04-24T19:37:46.722701Z"}

@cvcruz
Copy link

cvcruz commented Feb 10, 2024

Is there an update on this issue? I ran into the same thing (running finch, not Docker).

@anlesk
Copy link
Contributor Author

anlesk commented Feb 11, 2024

@cvcruz I switched to GitHub actions instead of self-hosting image.

@cvcruz
Copy link

cvcruz commented Feb 11, 2024

@cvcruz I switched to GitHub actions instead of self-hosting image.

@anlesk , thank you! I will give that a try.

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

No branches or pull requests

2 participants