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

Docker: run parity as normal user #9689

Merged
merged 1 commit into from
Oct 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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