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 - usermod: group '1001' does not exist #6840

Open
Tschrock opened this issue May 9, 2024 · 1 comment
Open

Docker - usermod: group '1001' does not exist #6840

Tschrock opened this issue May 9, 2024 · 1 comment
Labels
kind/triage Unclassified issues

Comments

@Tschrock
Copy link

Tschrock commented May 9, 2024

Problem Description

Same issue as #6684 (closed)
If .mitmproxy is owned by a group that exists on the host but not in the docker image (like a secondary user), it will fail to run.

Steps to reproduce the behavior:

  1. Create a new user/group on the host: $ adduser james
  2. Change .mitmproxy ownership to new user/group: $ chown -R james:james ~/.mitmproxy
  3. Try running the docker: $ docker run --rm -it -v ~/.mitmproxy:/home/mitmproxy/.mitmproxy -p 8080:8080 mitmproxy/mitmproxy

Result: usermod: group '1001' does not exist

System Information

Using mitmproxy/mitmproxy:latest, which currently is:
Mitmproxy: 10.3.0
Python: 3.11.9
OpenSSL: OpenSSL 3.2.1 30 Jan 2024
Platform: Linux-6.5.0-28-generic-x86_64-with-glibc2.31

@Tschrock Tschrock added the kind/triage Unclassified issues label May 9, 2024
@Prinzhorn
Copy link
Member

Any recommendation how to fix that? PRs are welcome. The code is here

usermod -o \
-u $(stat -c "%u" "$f") \
-g $(stat -c "%g" "$f") \
mitmproxy

ENTRYPOINT ["docker-entrypoint.sh"]

Tschrock added a commit to Tschrock/mitmproxy that referenced this issue May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/triage Unclassified issues
Projects
None yet
Development

No branches or pull requests

2 participants