Skip to content

Commit

Permalink
Merge pull request #143 from egyptiankarim/master
Browse files Browse the repository at this point in the history
Dockerfile Tweaks and Cleanup
  • Loading branch information
jsf9k authored Dec 1, 2017
2 parents 761c7d2 + fe1d5f2 commit 4e9505d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 48 deletions.
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
FROM python:3.6.3

# Create an unprivileged user
# Set up a workspace
ENV PSHTT_HOME=/home/pshtt
RUN mkdir ${PSHTT_HOME}
RUN mkdir ${PSHTT_HOME}

# Create an unprivileged user
RUN groupadd --system pshtt \
&& useradd --system --comment="pshtt user" --gid="pshtt" pshtt
&& useradd --system --comment="pshtt user" --gid="pshtt" pshtt

# Install pshtt
COPY . ${PSHTT_HOME}
RUN chown -R pshtt:pshtt ${PSHTT_HOME}
RUN pip install --no-cache ${PSHTT_HOME}

# Prepare to run
WORKDIR PSHTT_HOME
WORKDIR ${PSHTT_HOME}
USER pshtt:pshtt
ENTRYPOINT ["pshtt"]
CMD ["--help"]
39 changes: 0 additions & 39 deletions entrypoint.sh

This file was deleted.

6 changes: 1 addition & 5 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
set -e
set -x


docker build -t pshtt/cli .

docker run --rm -it \
--name pshtt \
-v $(pwd):/data \
`# Change the ownership of the files (**e.g** results) to the user with id 1042 and to the group with id 1042` \
-e USER_ID=1042 \
-e GROUP_ID=1042 \
-v $(pwd):/home/pshtt \
pshtt/cli $@

0 comments on commit 4e9505d

Please sign in to comment.