File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,10 @@ RUN apt-get update && \
66 apt-get install -y --no-install-recommends tmux && \
77 rm -rf /var/lib/apt/lists/*
88
9- # HACK: the security context of the injected pod could be run as any user, therefore
10- # all users must be able to write to the directory.
11- # Ensure the directory exists and is world-writable
9+ # Ensure the directory exists and is world-writable BEFORE we switch users
1210RUN mkdir -p /home/mitmproxy/.mitmproxy && \
13- chmod -R 777 /home/mitmproxy/.mitmproxy/
11+ chmod 777 /home/mitmproxy && \
12+ chmod 777 /home/mitmproxy/.mitmproxy
1413
1514# Hijack the mitmproxy entrypoint (docker-entrypoint.sh) so that
1615# configuration can be built from within the container using the
Original file line number Diff line number Diff line change @@ -4,14 +4,9 @@ set -o errexit
44set -o pipefail
55set -o nounset
66
7- # Ensure the .mitmproxy directory exists with proper permissions
8- mkdir -p /home/mitmproxy/.mitmproxy
9- chmod 777 /home/mitmproxy/.mitmproxy
10-
117# Copy the config file if it exists and is readable
128if [ -f /home/mitmproxy/config/config.yaml ] && [ -r /home/mitmproxy/config/config.yaml ]; then
139 cp /home/mitmproxy/config/config.yaml /home/mitmproxy/.mitmproxy/config.yaml
14- chmod 666 /home/mitmproxy/.mitmproxy/config.yaml
1510 echo " Config file copied to /home/mitmproxy/.mitmproxy/config.yaml" >&2
1611else
1712 echo " Warning: Config file not found or not readable at /home/mitmproxy/config/config.yaml" >&2
You can’t perform that action at this time.
0 commit comments