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

Docker: change /config/config.toml permissions so Athens can be ran as non-root user #1695

Closed
tzvetkoff opened this issue Feb 6, 2021 · 2 comments · Fixed by #1699
Closed

Comments

@tzvetkoff
Copy link
Contributor

Problem

Currently the /config/config.toml has permissions set to 0700.
This makes it impossible to run Athens with a non-root user, and this is in turn needed so you can mount the filesystem storage directory with your UID/GID.

Possible solution
Changing the permissions to something sane, like 0644 (or 0755 and add a #!/bin/athens-proxy hashbang.)

Alternative
Building a wrapper image is indeed an option, yet it's not as simple as docker run gomods/athens:latest -u $UID:$GID -v $PWD/data:/data -e...

Additional context
I couldn't find the Dockerfile used to build https://hub.docker.com/r/gomods/athens, otherwise I would've sent a PR (even though it's a 1-line change.)

@endocrimes
Copy link

@tzvetkoff looks like this is the dockerfile they use for pushing those images https://github.com/gomods/athens/blob/main/cmd/proxy/Dockerfile

@arschles
Copy link
Member

arschles commented Mar 6, 2021

Thanks for the pointer @endocrimes 😊

@tzvetkoff feel free to send a pull request - we'd really appreciate that!

tzvetkoff added a commit to tzvetkoff/athens that referenced this issue Mar 7, 2021
arschles added a commit that referenced this issue Mar 31, 2021
…#1699)

Fixes #1695.

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants