fix: include submodule bare repos in docker build context #5118
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.
Impact: minor
Type: bugfix|chore
Issue
OK this one is a pretty long chain to understand, but here goes. If you bundle your custom reaction plugins by adding them as git submodules, and one of your plugins depends on a package directly from github, it seems to cause docker builds to fail during the npm install. For some reason, in this scenario npm wants to access the submodule's gitdir (no idea what for). Given the globs in the
.dockerignore
as is, that directory does not exist in the docker container during the build.Solution
Add an exclusion line to
.dockerignore
so the necessary directories are part of the docker build context.Breaking changes
None
Testing
.env
into this test reaction directoryOK now you're in the container which is kind of like how it is in some CI environments.
You'll get this error: