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

Commit 6e87ee9

Browse files
asymmetric5chdn
authored andcommitted
Docker: run as parity user (#9689)
1 parent 8d768e6 commit 6e87ee9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

scripts/docker/hub/Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,17 @@ RUN apt autoremove -y
1515
RUN apt clean -y
1616
RUN rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*
1717

18+
RUN groupadd -g 1000 parity \
19+
&& useradd -m -u 1000 -g parity -s /bin/sh parity
20+
21+
USER parity
22+
23+
WORKDIR /home/parity
24+
25+
ENV PATH "~/bin:${PATH}"
26+
1827
#add TARGET to docker image
19-
COPY artifacts/x86_64-unknown-linux-gnu/$TARGET /usr/bin/$TARGET
28+
COPY artifacts/x86_64-unknown-linux-gnu/$TARGET ./bin/$TARGET
2029

2130
# Build a shell script because the ENTRYPOINT command doesn't like using ENV
2231
RUN echo "#!/bin/bash \n ${TARGET} \$@" > ./entrypoint.sh

0 commit comments

Comments
 (0)