Skip to content

Commit 1dfaf56

Browse files
committed
Inline tiny shell script
1 parent 6c62a1a commit 1dfaf56

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

docker/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ WORKDIR /source
2121
# re https://github.com/docker/docker/issues/7198#issuecomment-158566258
2222
RUN adduser --no-create-home --disabled-login --gecos "" crater --uid 1000
2323

24-
# The run.sh script configures the user id, controlled by -e USER_ID, and then
24+
# Configure the user id, controlled by -e USER_ID, and then
2525
# runs some command, controlled by -e CMD
26-
COPY run.sh /run.sh
27-
CMD ["/run.sh"]
26+
CMD ["bash", "-c", "usermod -u \"$USER_ID\" crater && exec su crater -c \"/run2.sh $CMD\""]
2827

29-
# run.sh script runs run2.sh under su, which sets up the environment and runs
30-
# $CMD
28+
# sets up the environment for $CMD
3129
COPY run2.sh /run2.sh

docker/run.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)