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

Commit

Permalink
Docker: run as parity user (#9689)
Browse files Browse the repository at this point in the history
  • Loading branch information
asymmetric authored and 5chdn committed Oct 9, 2018
1 parent 035ebdc commit 6ea1af3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/docker/hub/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@ RUN apt autoremove -y
RUN apt clean -y
RUN rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*

RUN groupadd -g 1000 parity \
&& useradd -m -u 1000 -g parity -s /bin/sh parity

USER parity

WORKDIR /home/parity

ENV PATH "~/bin:${PATH}"

#add TARGET to docker image
COPY artifacts/x86_64-unknown-linux-gnu/$TARGET /usr/bin/$TARGET
COPY artifacts/x86_64-unknown-linux-gnu/$TARGET ./bin/$TARGET

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

0 comments on commit 6ea1af3

Please sign in to comment.