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

Dockerfile is bad #251

Open
myf opened this issue Oct 13, 2017 · 0 comments
Open

Dockerfile is bad #251

myf opened this issue Oct 13, 2017 · 0 comments

Comments

@myf
Copy link
Contributor

myf commented Oct 13, 2017

.. at least it's confusing, here's its full glory

ADD package.json /tmp/package.json
RUN cd /tmp && npm install && npm install lodash --save-dev
RUN cp -a /tmp/node_modules /dokomo/

why are you building node_modules in /tmp and then copy it back instead of just doing it in its folder

RUN cp -r /dokomo/dokomoforms/static/dist /var/www/static
RUN cp /dokomo/dokomoforms/static/robots.txt /var/www/static/robots.txt
RUN cp /dokomo/dokomoforms/static/manifest.json /var/www/static/manifest.json
RUN cp /dokomo/dokomoforms/static/src/common/img/favicon.png /var/www/static/favicon.png

have you heard of the COPY command? use that will cache better via docker
https://docs.docker.com/engine/reference/builder/#copy

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

No branches or pull requests

1 participant