-
Notifications
You must be signed in to change notification settings - Fork 39
Allow for setting context of Docker build #37
Conversation
This reverts commit de37b4e.
the test failures appear to be occurring for all PRs and not related to this one |
@@ -67,7 +67,7 @@ | |||
- not item.item.pre_build_image | default(false) | |||
docker_image: | |||
build: | |||
path: "{{ molecule_ephemeral_directory }}" | |||
path: "{{ item.item.context | default(molecule_ephemeral_directory) }}" |
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.
Why would this be called context and not path? I also do not find this documented anywhere, which worries me a little bit.
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.
This is how docker is calling it. Because the image is built by the docker engine (that might not even run on the same host as the CLI command), this is what happens when we execute the build command (a bit simplified, but close enough):
- CLI tool packages the current directory into a build context and sends it to the engine.
- Engine executes instructions from the Dockerfile, taking any files required from the context that has been sent to it.
I hope this explains things a bit.
We should probably close this PR or #51 since they are both trying to achieve the same thing. This way, we can have a discussion about the "right" implementation in one place. |
Closed per @tadeboro comment. |
re-open of #30 (which I totally forgot about 😬 )
I've removed the additional "bug fixes", which I'm not sure where correct, to focus on the main issue
Fixes: #18