Copy create-docker-context-for-node-component script from magda docker-utils for ci.terria.io builds #679
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've shortened the name to
create-docker-context.js
to signify that the script is different to the older scripts in forks.In the end it isn't very different from the
@magda/docker-utils
script, except that it supports using a Dockerfile that isn't at the root of the repository. I think this is essential for us. We don't want to prominently show a Dockerfile that is actually the second stage of a build process that requires a specialised docker context to build the correct image.In a future PR I'd like to replace the TerriaMap build used for official releases to
ghcr.io/terriajs/terriamap
with one using this process. That will greatly reduce time taken on CI to run releases (currently installing dependencies and building a multi-arch TerriaMap container takes hours, but we could just install dependencies and build TerriaMap once on CI's native arch and copy artifacts, as thecreate-docker-context.js
script does).