-
Notifications
You must be signed in to change notification settings - Fork 3
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
Rework docker build process #2163
Conversation
I suddenly realized, that production packages are only I think that also will eliminate the need of auth. Gonna figure that out and rework pr. |
Looks like moving deps decreased the size even further: to 100 mb, which is 4x times smaller! It'll be even better (I think ~80 mb) when yarn will fix its Also, because of yarn it is impossible to get rid of authToken, even if |
d1696df
to
08538a0
Compare
LGTM |
@@ -1,7 +1,19 @@ | |||
FROM mhart/alpine-node:7.10.0 | |||
FROM mhart/alpine-node:8.1.0 |
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.
If we update docker image base version here, can we do it for all our node projects?
@jmataya Can you create new npm user to use its token for CI builds? |
COPY ./package.json /ashes/package.json | ||
COPY ./yarn.lock /ashes/yarn.lock | ||
COPY ./.npmrc-docker /ashes/.npmrc | ||
COPY ./src/opt /ashes/src/opt |
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.
I'd suggest using one COPY
command for all files to reduce number of layers in the image.
DO NOT MERGE
What was done
Rework dockerfile
The result is: decrease image size from
~400 mb
to~100 mb
. 4x.Requirements
.npmrc-docker
file with auth token. So, for now it must not be merger. Seereadme.md
in this pr for details.DockerNo need for1.13+
(2016 december version or higher).--squash
now.