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

Pull FROM images in relative path Dockerfiles #1824

Merged
merged 1 commit into from
Sep 22, 2024

Conversation

jrnorth
Copy link
Contributor

@jrnorth jrnorth commented Sep 21, 2024

Fixes #1823

@@ -251,6 +251,7 @@ protected void givenMavenProject(AbstractDockerMojo mojo) {
mojo.project = mavenProject;
mojo.log = ansiLogger;
mojo.outputDirectory= "target/docker";
mojo.sourceDirectory = "src/main/docker";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this to prevent a NullPointerException in the test buildUsingConfiguredBuildxWithContext. It sets a contextDir on the BuildImageConfiguration, which causes a default dockerFileFile to be set. This causes the BuildService to attempt to get the FROM images from the Dockerfile, and the source directory needs to be set to calculate the absolute path to the file.

Copy link

@rohanKanojia rohanKanojia merged commit 25e61bf into fabric8io:master Sep 22, 2024
19 of 22 checks passed
@rohanKanojia
Copy link
Member

@jrnorth : Thanks a lot!

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.

FROM images in Dockerfiles specified by relative paths are not pulled when building
2 participants