Skip to content
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

Updated Dockerfile #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

acald-creator
Copy link

Dockerfile is still WIP for certain lines that may need to be reverted upon discussion.

Checklist

[ x ] I have read the contributing guidelines
[ x ] I have read the documentation
[ x ] I have included a descriptive Pull Request title
[ x ] I have included a Pull Request description of my changes
[ x ] I have included tests where/when required (see contributing guidelines)
[ x ] I have included documentation modifications/additions where/when required (see contributing guidelines)

I have updated the Dockerfile with the following items

  1. Changed node:16-alpine to node:17-alpine
  2. Grouped ENV one-line
  3. Write out the directory /usr/src/app/ instead of storing it in ENV
  4. Indicate WORKDIR is /usr/src/app as the starting point

@binarymist
Copy link
Member

Thanks for this :-)

Combining ENVs might make the build time slightly shorter but it doesn't actually reduce the number of image layers.

Removing the WORKDIR environment variable also arguably creates unnecessary repetition.

Did you consider multi-stage builds?

Did you consider combining more commands?

Did you consider creating Dockerfile from scratch (https://hub.docker.com/_/scratch)?

There are many techniques for creating small Dockerfiles, which ones did you consider and why have you decided not to use them?

Thanks .

@binarymist
Copy link
Member

Any progress @acald-creator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants