mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-25 17:16:00 +03:00
[GH-ISSUE #1258] Question: shell commands passed in to Docker-Compose archivebox are getting executed as root and failing #2282
Labels
No labels
expected: maybe someday
expected: next release
expected: release after next
expected: unlikely unless contributed
good first ticket
help wanted
pull-request
scope: all users
scope: windows users
size: easy
size: hard
size: medium
size: medium
status: backlog
status: blocked
status: done
status: idea-phase
status: needs followup
status: wip
status: wontfix
touches: API/CLI/Spec
touches: configuration
touches: data/schema/architecture
touches: dependencies/packaging
touches: docs
touches: js
touches: views/replayers/html/css
why: correctness
why: functionality
why: performance
why: security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ArchiveBox#2282
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Brancliff on GitHub (Oct 29, 2023).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1258
I'm sorta new to this sort of thing, but I thought if you wanted to run these containers as root, you'd say something like "privileged: true" in the docker-compose or something. I didn't, but I'm still getting errors trying to spin this up.
Here's my docker-compose:
And here's the error I get when trying to make a new user:
I mean, I can understand that these commands start with root@something, I just don't know what I need to put in my docker-compose to not do that
@pirate commented on GitHub (Oct 30, 2023):
How are you entering the docker shell to run
archivebox manage createsuperuser?The container is not running as root the way you have it configured, however you must be using some special method of getting to the bash shell that runs the shell process as root, as that's not what normally happens.
Make sure you're running
docker compose run archivebox manage createsuperuser, it takes care of changing the user for you.docker compose exec ...or any other command that would drop you into a root shell is not supported, but if you only have one of those methods available you can runsu archiveboxwithin the shell to switch to the archivebox user.@pirate commented on GitHub (Jan 19, 2024):
Closing as stale.
For future reference make sure all archivebox commands are run with
docker compose run archivebox ...notdocker compose exec archivebox. There is a new warning in v0.7.2 that shows if it's run the wrong way by mistake.