-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerfile Tweaks and Cleanup #143
Conversation
Addressing issue #: - I corrected the variable expansion issue with `WORKDIR` in the `Dockerfile`. - Did some light "copy editing". - Deleted the `entrypoint.sh` script. - Corrected some of the flags in `run`.
I love deleting code! And it looks good to me, but deferring to @jsf9k as a better Docker reviewer. |
@egyptiankarim, thanks for catching the error and thanks for getting rid of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requested one very minor change. After that I'll approve and merge it. (I'd make the one-line change myself, but I don't seem to have permission push to this branch.)
Dockerfile
Outdated
RUN mkdir ${PSHTT_HOME} | ||
|
||
# Create an unprivileged user | ||
RUN groupadd --system pshtt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@egyptiankarim, do you mind combining these two RUN
statements like they were originally? I'm kind of insane about combining related statements where possible to reduce the number of layers in the Docker image.
|
||
# 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} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch!
`# 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 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting rid of some magic numbers! 👍
@egyptiankarim You should be able to check a box somewhere that lets @jsf9k make changes on the PR directly. I know it lets you do at post-time, not as certain about after posting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Add nixfmt pre-commit hook
Addressing issue #144:
WORKDIR
in theDockerfile
.entrypoint.sh
script.run
.