-
Notifications
You must be signed in to change notification settings - Fork 263
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 using alpine #458
base: terriajs7
Are you sure you want to change the base?
Dockerfile using alpine #458
Conversation
* updated docker file to build from latest version of the code * added docker build pipeline
* build docker image with alpine * updated ci
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.
Significantly shrinking the size of our image sounds like a good idea, and I can't think off the top of my head why we're not already using alpine. @soyarsauce, @peterhassall and/or @steve9164 should also have a look at this.
Unfortunately we can't merge this PR as is - our Dockerfile is written as a way to package up an immutable build and this undoes most of that. For some of our maps, we specify a set of dependencies that we want at time of building/deploying/releasing a given TerriaMap and commit that lockfile - and allowing dockerfile to pull in newer versions of libraries will introduce an u-tracked (bar looking at the lockfile inside a given image) and different set of dependencies.
One reason would be having to check puppeteer deps again, size reduction is a really good goal but this PR would better suit a directory/dockerfile targetted for running in this fashion, or to separate just the size shrink change from the dependency-update change |
@soyarsauce so just to clarify, are you suggesting that @davidedelerma should set up a separate Dockerfile in |
- Original Docker file is now based on Alpine to reduce image size - An alternative Docker file is in docker-alternate. It installs the packages defined in package.json at build time so that it can be build automatically from what is defined in package.json without the need of install tha packages locally first.
@soyarsauce @KeyboardSounds I pushed some changes that follow up your suggestions. |
* Adding server configuration folder * Modifying readme for passing a whole config file instead of a single port
* changed accent colors buttons colors lateral menu colors for solomon * better contrast on hover over menu item in catalog * added logos for sl and vt
Conflicts: deploy/docker-alternate/readme_dockerfile_alternate.md deploy/docker/Dockerfile
Using Apine to get a smaller image and runnin npm install at built time to pull the newest versions of the libraries.
Using Alpine resulted in ~50% size reduction of the image compared to data61/terria-terriamap