Skip to content

Commit

Permalink
Set HOME and create default user in Dockerfile
Browse files Browse the repository at this point in the history
Fixes #47
  • Loading branch information
dleehr committed Mar 7, 2019
1 parent 64591c6 commit 4271319
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@ COPY . /app
RUN pip install /app
WORKDIR /app

# Create a default user and home directory
ENV HOME=/home/calrissian
RUN useradd -u 1001 -r -g 0 -m -d ${HOME} -s /sbin/nologin \
-c "Default Calrissian User" calrissian && \
chown -R 1001:0 /app && \
chmod g+rwx ${HOME}

USER calrissian
CMD ["calrissian"]

0 comments on commit 4271319

Please sign in to comment.