Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 41e9f0a

Browse files
authored
Fix alpine
1 parent 58dd364 commit 41e9f0a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

script-library/test/regression/alt.Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ FROM ${IMAGE_TO_TEST}
1010
# Add non-root user
1111
USER root
1212
ARG USERNAME="bort"
13-
RUN groupadd --gid 1001 the-borts && useradd -s /bin/bash --uid 1001 --gid 1001 -m ${USERNAME}
13+
RUN . /etc/os-release \
14+
&& if [ "${ID}" = "alpine" ] || [ "${ID_LIKE}" = "alpine" ]; then \
15+
addgroup -g 1001 the-borts && adduser -D -s /bin/bash -u 1001 -G the-borts ${USERNAME}; \
16+
else \
17+
groupadd --gid 1001 the-borts && useradd --uid 1001 --gid 1001 -m ${USERNAME}; \
18+
fi
1419

1520
# Run non-default tests
1621
ARG RUN_COMMON_SCRIPT="true"

0 commit comments

Comments
 (0)