Skip to content

Not starting properly... solved... suggestions #21

@tiagobugarin

Description

@tiagobugarin

When trying to start a container it keeps restarting. This is the output:

tor  | Jan 08 22:21:21.830 [notice] Tor 0.4.8.21 running on Linux with Libevent 2.1.12-stable, OpenSSL 3.3.2, Zlib 1.3.1, Liblzma 5.8.1, Libzstd 1.5.7 and Unknown N/A as libc.
tor  | Jan 08 22:21:21.830 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
tor  | Jan 08 22:21:21.830 [notice] Configuration file "/etc/tor/torrc" not present, using reasonable defaults.
tor  | Jan 08 22:21:21.834 [notice] Opening Socks listener on 127.0.0.1:9050
tor  | Jan 08 22:21:21.834 [notice] Opened Socks listener connection (ready) on 127.0.0.1:9050
tor  | Jan 08 22:21:21.834 [warn] Error creating directory /var/lib/tor/.tor: Permission denied
tor  | Jan 08 22:21:21.834 [notice] Closing partially-constructed Socks listener connection (ready) on 127.0.0.1:9050
tor  | Jan 08 22:21:21.834 [warn] Failed to parse/validate config: Couldn't create private data directory "/var/lib/tor/.tor"

Reading the compose.yml I noticed it is changing to user tor.
I made a modification to the compose.yml so it would create a Docker volume for the mount points and the container worked. Then I sent a command to learn about the tor uid:gid on Alpine Linux and found out it is 100:101.
Took the container down, created the directories, applied the correct ownership, changed the compose.yml back to the original state and got it working correctly.

Two suggestions: change the compose.yml to use a Docker volume as a default; or to instruct about the creation of those directories and changing its ownerships.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions