Skip to content

Commit 4e9505d

Browse files
authored
Merge pull request #143 from egyptiankarim/master
Dockerfile Tweaks and Cleanup
2 parents 761c7d2 + fe1d5f2 commit 4e9505d

File tree

3 files changed

+7
-48
lines changed

3 files changed

+7
-48
lines changed

Dockerfile

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
FROM python:3.6.3
22

3-
# Create an unprivileged user
3+
# Set up a workspace
44
ENV PSHTT_HOME=/home/pshtt
5-
RUN mkdir ${PSHTT_HOME}
5+
RUN mkdir ${PSHTT_HOME}
6+
7+
# Create an unprivileged user
68
RUN groupadd --system pshtt \
7-
&& useradd --system --comment="pshtt user" --gid="pshtt" pshtt
9+
&& useradd --system --comment="pshtt user" --gid="pshtt" pshtt
810

911
# Install pshtt
1012
COPY . ${PSHTT_HOME}
1113
RUN chown -R pshtt:pshtt ${PSHTT_HOME}
1214
RUN pip install --no-cache ${PSHTT_HOME}
1315

1416
# Prepare to run
15-
WORKDIR PSHTT_HOME
17+
WORKDIR ${PSHTT_HOME}
1618
USER pshtt:pshtt
1719
ENTRYPOINT ["pshtt"]
1820
CMD ["--help"]

entrypoint.sh

-39
This file was deleted.

run

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
set -e
44
set -x
55

6-
76
docker build -t pshtt/cli .
87

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

0 commit comments

Comments
 (0)