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

Fix our container image size #136

Merged
merged 5 commits into from
Sep 1, 2023

Conversation

ian-noaa
Copy link
Collaborator

@ian-noaa ian-noaa commented Aug 23, 2023

This PR does a few things:

  • Remove cmake from our Dockerfile to prevent Couchbase from being rebuilt by Meteor/NPM. If Couchbase is built from source it takes up a large amount of space in the image.
  • Removes some OS-specific Couchbase dependencies that made it into MATScommon.
  • Update the .dockerignore to match MATS - it appears to be important to exclude MATScommon's .npm/packages/npm-shrinkwrap.json file from the docker container build.
  • Removes workarounds that were added to CI.

Closes #132

Hopefully this will prevent Couchbase from being rebuilt by Meteor/NPM.
Once rebuilt, it takes up a large amount of space in the image.
@ian-noaa ian-noaa self-assigned this Aug 23, 2023
Use the corrected npm-shrinkwrap.json file.
@ian-noaa ian-noaa changed the title Remove cmake from our Dockerfile Fix our container image size Aug 23, 2023
@ian-noaa ian-noaa linked an issue Aug 23, 2023 that may be closed by this pull request
MATS ignores the .npm directory in MATScommon as well. This prevents
Meteor from using the .npm/packages/npm-shrinkwrap.json file and
so Meteor pulls in the correct NPM package for the architecture.
Otherwise, Meteor will try to rebuild from source and greatly increase
the image size.

Additionally, reorganized the .dockerignore and updated the exclude
rules to better target artifacts that shouldn't be brought into the
image.
Reactivate our container image scanning, set the pipeline timeout
back to 30 minutes, and re-enable fail-fast builds
Copy link
Collaborator

@mollybsmith-noaa mollybsmith-noaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@ian-noaa ian-noaa merged commit 1178d56 into development Sep 1, 2023
22 checks passed
@ian-noaa ian-noaa deleted the 132-container-image-size-has-ballooned branch September 1, 2023 19:49
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.

Container image size has ballooned
2 participants