question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docker-compose running as root

See original GitHub issue

I’m trying out docker-compose and it’s running as root, which gives me an error.

I.e.

$ echo "https://example.com" | docker-compose exec -T archivebox archivebox add
[i] [2020-08-11 20:00:18] ArchiveBox v0.4.11: archivebox add < /dev/stdin
    > /data

[!] ArchiveBox should never be run as root!
    For more information, see the security overview documentation:
        https://github.com/pirate/ArchiveBox/wiki/Security-Overview#do-not-run-as-root

Adding ALLOW_ROOT=True to my docker-compose.yml didn’t do anything.

Also, a few nitpicky doc things on https://github.com/pirate/ArchiveBox/wiki/Docker:

  • it still says exec -T archivebox /bin/archive - should that last bit be archivebox add ?
  • It says http://127.0.0.1:8080 - should be 8000

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
cdvv7788commented, Aug 12, 2020

Try running echo "https://example.com" | docker-compose run -T archivebox add Also, check your docker-compose.yml file, and make sure you are using a locally built image or make sure you are actually pulling the latest and not using a local version (run docker-compose pull just in case). Run: docker build -t archivebox . Change (docker-compose.yml): image: archivebox And then run: echo "https://example.com" | docker-compose run -T archivebox add

The run command uses the docker-entrypoint, which takes care of adjusting the permissions for the specific user to run as. The docs definitely need some love.

0reactions
cdvv7788commented, Aug 12, 2020

Weird…https works for me. That is a different issue tho. Glad it worked!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to configure docker-compose.yml to up a container as ...
Exists a method to configure my docker-compose.yml to connect my containers like root without stop a container and run independently?
Read more >
"docker-compose up" as root user or non-root user?
The important detail is to run applications inside of your container as a non-root user. It's the equivalent of systemd running as root...
Read more >
Run the Docker daemon as a non-root user (Rootless mode)
Rootless mode allows running the Docker daemon and containers as a non-root user to mitigate potential vulnerabilities in the daemon and the container...
Read more >
Running Docker Containers as ROOT: | dockerlabs - Collabnix
One of the best practices while running Docker Container is to run processes with a non-root user. This is because if a user...
Read more >
How to set user and group in Docker Compose
docker user root masking their identity maybe? ... docker-compose run app id WARNING: The UID variable is not set. Defaulting to a blank ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found