File tree Expand file tree Collapse file tree 3 files changed +23
-18
lines changed
contrib/containers/deploy Expand file tree Collapse file tree 3 files changed +23
-18
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,17 @@ FROM phusion/baseimage:noble-1.0.0
22LABEL maintainer="Dash Developers <dev@dash.org>"
33LABEL description="Dockerised DashCore, built from CI"
44
5- # Setup unprivileged user
6- ARG USER_ID=1000 \
7- GROUP_ID=1000
8- RUN groupmod -g ${GROUP_ID} -n dash ubuntu; \
9- usermod -u ${USER_ID} -md /home/dash -l dash ubuntu; \
10- mkdir -p /home/dash/.dashcore && \
5+ ARG USER_ID
6+ ARG GROUP_ID
7+
8+ ENV HOME="/home/dash"
9+
10+ # add user with specified (or default) user/group ids
11+ ENV USER_ID="${USER_ID:-1000}"
12+ ENV GROUP_ID="${GROUP_ID:-1000}"
13+ RUN groupadd -g ${GROUP_ID} dash && \
14+ useradd -u ${USER_ID} -g dash -s /bin/bash -m -d /home/dash dash && \
15+ mkdir /home/dash/.dashcore && \
1116 chown ${USER_ID}:${GROUP_ID} -R /home/dash
1217
1318COPY bin/* /usr/local/bin/
Original file line number Diff line number Diff line change @@ -52,12 +52,12 @@ ARG TAG
5252
5353ENV HOME="/home/dash"
5454
55- # Setup unprivileged user
56- ARG USER_ID=1000 \
57- GROUP_ID=1000
58- RUN groupmod -g ${GROUP_ID} -n dash ubuntu; \
59- usermod -u ${USER_ID} -md /home/dash -l dash ubuntu; \
60- mkdir -p /home/dash/.dashcore && \
55+ # add user with specified (or default) user/group ids
56+ ENV USER_ID="${USER_ID:- 1000}"
57+ ENV GROUP_ID="${GROUP_ID:- 1000}"
58+ RUN groupadd -g ${GROUP_ID} dash && \
59+ useradd -u ${USER_ID} -g dash -s /bin/bash -m -d /home/ dash dash && \
60+ mkdir /home/dash/.dashcore && \
6161 chown ${USER_ID}:${GROUP_ID} -R /home/dash
6262
6363RUN apt-get update && \
Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ ARG GITHUB_REPOSITORY
99
1010ENV HOME /home/dash
1111
12- # Setup unprivileged user
13- ARG USER_ID=1000 \
14- GROUP_ID= 1000
15- RUN groupmod -g ${GROUP_ID} -n dash ubuntu; \
16- usermod -u ${USER_ID} -md /home/dash -l dash ubuntu; \
17- mkdir -p /home/dash/.dashcore && \
12+ # add user with specified (or default) user/group ids
13+ ENV USER_ID ${USER_ID:-1000}
14+ ENV GROUP_ID ${ GROUP_ID:- 1000}
15+ RUN groupadd -g ${GROUP_ID} dash && \
16+ useradd -u ${USER_ID} -g dash -s /bin/bash -m -d /home/ dash dash && \
17+ mkdir /home/dash/.dashcore && \
1818 chown ${USER_ID}:${GROUP_ID} -R /home/dash
1919
2020RUN apt-get update && \
You can’t perform that action at this time.
0 commit comments