File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 11# # Image name: faucet/python3
22
3- FROM faucet/base:7.0.0
3+ FROM python:3.9-alpine3.15
44
5- RUN apk add --no-cache python3 py-pip && \
5+ RUN apk add --no-cache bash su-exec && \
66 if [ ! -e /usr/bin/pip ]; then ln -s /usr/bin/pip3 /usr/bin/pip; fi && \
77 if [ ! -e /usr/bin/python ]; then ln -s /usr/bin/python3 /usr/bin/python; fi
8+
9+ COPY entrypoint.sh /usr/local/bin/entrypoint.sh
10+
11+ ENTRYPOINT ["/usr/local/bin/entrypoint.sh" ]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Add local user
4+ # Either use the LOCAL_USER_ID if passed in at runtime or
5+ # fallback to 0 to maintain backwards compatibility
6+
7+ USER_ID=${LOCAL_USER_ID:- 0}
8+ GROUP_ID=${LOCAL_GROUP_ID:- 0}
9+
10+ echo " Starting with UID=$USER_ID GID=$GROUP_ID "
11+ export HOME=" /home/faucet"
12+ addgroup -g " ${GROUP_ID} " faucet > /dev/null 2>&1 || true
13+ adduser -u " ${USER_ID} " -G faucet -g " " -h " ${HOME} " -D faucet > /dev/null 2>&1 || true
14+
15+ exec /sbin/su-exec faucet " $@ "
You can’t perform that action at this time.
0 commit comments