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

operation not permitted running in docker on raspberry pi. #167

Open
sgmoore opened this issue Sep 1, 2022 · 3 comments
Open

operation not permitted running in docker on raspberry pi. #167

sgmoore opened this issue Sep 1, 2022 · 3 comments
Labels
question Further information is requested

Comments

@sgmoore
Copy link

sgmoore commented Sep 1, 2022

I'm posting this just in case anyone else has a similar issue.

I have been running this for a while, but after doing a docker-compose pull, the container was not starting and the logs had the operation not permitted message coming from logging init

I was able to get around this by adding privileged : true to the speedtest service section of the docker-compose.yml

Not sure what the exact permissions required are.

@MiguelNdeCarvalho
Copy link
Owner

Hey,

@sgmoore sorry for the late response, can you give me your docker-compose.yml content please? It should work without the privileged option enabled.

Thanks,
MiguelNdeCarvalho

@MiguelNdeCarvalho MiguelNdeCarvalho added the question Further information is requested label Sep 11, 2022
@sgmoore
Copy link
Author

sgmoore commented Sep 12, 2022

docker-compose.zip

Attached is my current docker-compose.yml file

The speedtest service block is


  speedtest:
    tty: true
    stdin_open: true
    expose:
      - 9798
    ports:
      - 9798:9798
    image: miguelndecarvalho/speedtest-exporter
    restart: always
    networks:
      - back-tier
    cap_add:
      - NET_ADMIN
      - NET_RAW
    privileged : true
    dns:
      - 1.1.1.1
      - 8.8.8.8

The cap_add section was added to try to fix the problem (but didn't), and then privileged : true was added and did fix the problem. The dns entries were added later.

@Punkado
Copy link

Punkado commented Sep 16, 2022

Hello,

I can confirm the same problem happening here, only a privileged container works, the full error message:

Traceback (most recent call last): File "/app/exporter.py", line 4, in <module> import logging File "/usr/local/lib/python3.10/logging/__init__.py", line 57, in <module> _startTime = time.time() PermissionError: [Errno 1] Operation not permitted

Using the older version v3.5.2 didn't help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants