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
Optimize Dockerfile and add .dockerignore #441
Conversation
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.
Thanks! The dockerfile updates look good, though I don't think the .dockerignore is necessary, as it might hinder us wanting to run tests in docker in the future, while not significantly speeding up the build process (there's not that many files being ignored).
Can you remove the .dockerignore?
Removed the |
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.
LGTM! Thanks!
@another-rex - can we merge this? |
Sorry for the delay, Just been testing Github actions recently and the relative ENTRYPOINT might cause problems, as github actions changes the working directory, and I haven't had time to test it out properly yet. |
Changes include:
Removed the
mkdir
command as theWORKDIR
instruction automatically creates the folder if it doesn't already exist.Added a .dockerignore file to prevent unnecessary files (such as README, tests, Dockerfile itself, etc.) from being included in the Docker context, thereby speeding up the build process.
Combined two
RUN
instructions into one in order to reduce the number of layers in the final image.