Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Use numeric id for USER #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions alpine/latest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ RUN apk add --no-cache brotli brotli-dev libssh2 nghttp2-dev && \
###############################################################
# add non privileged curl user
###############################################################
RUN addgroup -S curl_group && adduser -S curl_user -G curl_group

# To fix some errors in kubernetes, we need a numeric id. We add this test to
# avoid future errors if this ever changes.
RUN addgroup -S curl_group && adduser -S curl_user -G curl_group && \
[ "$(cat /etc/passwd | grep curl_user | cut -d : -f3 )" -eq 100 ]

###############################################################
# set curl ca bundle
Expand All @@ -104,7 +108,9 @@ RUN ln -s /usr/lib/libcurl.so.4 /usr/lib/libcurl.so
###############################################################
# set user
###############################################################
USER curl_user
# We use a numeric id (that is tested for stability above) to avoid errors in
# Kubernetes.
USER 100

###############################################################
# set entrypoint
Expand Down