-
Notifications
You must be signed in to change notification settings - Fork 76
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
New, slimmer image and updated Dockerfile #4934
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.
Phantom.js maybe was needed for the really old build process that used bash scripts. I'm not sure. Regardless, it's a deprecated project and shouldn't be used anymore for that reason alone.
Looks good, but I'm not sure how to test this all exactly either. I'm gonna take a pass at writing some docs on the deployment process to add to the readme in a separate PR.
We could create another folder in the |
Dockerfile
Outdated
|
||
WORKDIR /src | ||
|
||
RUN apk update && apk upgrade && apk add --no-cache bash git openssh |
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.
It's a minor thing, but there's no need to update/upgrade here. The --no-cache
option loads the package index automatically.
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.
Good to know. I'm gonna pare this down to just adding git since bash isn't needed and ssh is a dep of git.
It should be safe to just run the normal stage command to test this. |
Seems to work fine, I was able to successfully stage a branch here with |
There were a few issues early this week with PFE deployment Jenkins jobs failing to complete. The issue was node crashing with an error that indicated it was out of memory. Taking a look at the Dockerfile, it seemed that it was building a larger than necessary image (full ubuntu) and loading a bunch of stuff it didn't need (i.e. phantomjs) just to run the npm build.
This PR switches to a slim alpine image straight from npm and only installs git because npm needs it (and bash, but that's probably extraneous). The extra Dockerfile.deps was removed with a piece or two collapsed into the main one. This should keep total image size way down and eliminate the need for two separate images.
This is WIP because while I tested a few
docker run
commands, I'm not sure how to test short of straight up deploying master to staging and I'd like another pair of PFE-familiar and/or devops eyeballs looking when that happens.