fix(docker): Fix failing end to end tests#997
Merged
mergify[bot] merged 2 commits intoaws:masterfrom Jun 6, 2020
Merged
Conversation
This PR resolves an issue in the construciton of the call to `docker build` which resulted in the following syntax for a dockerfile at the location `path/to/dockerfile`: ``` docker build -t <image-tag> path/to/ -f dockerfile ``` The trailing slash causes the end to end tests to fail to find a dockerfile at the specific location.
Contributor
Author
|
manual e2e output: |
iamhopaul123
approved these changes
Jun 6, 2020
Contributor
iamhopaul123
left a comment
There was a problem hiding this comment.
Thanks for fixing this!
Contributor
|
Thanks for the thorough explanation! |
huanjani
approved these changes
Jun 6, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
With #980, we fixed an issue which occurred when there were multiple dockerfiles present in the build directory.
However, this may have broken our end to end tests, because the call to Docker was formatted as the following:
This should be fine, but the end to end tests began to fail on Monday with the following output:
This indicates that although the Dockerfile path was set to
hello/Dockerfile, Docker was looking for the file somewhere in the root directory of that path (.) and subsequently failing.This fix always sets the dockerfile path to be relative to the root of the docker build context, not the leaf of the build context.
(previously we were parsing paths like
path/to/dockerfileintopath/toanddockerfile, assuming that the dockerfile would be searched for inpath/to, notpath. This was incorrect.)The new behavior is to call:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.