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

What property should I pass so that it doesn't automatically try to build the docker image. #1831

Open
peshoicov opened this issue Oct 7, 2024 · 0 comments

Comments

@peshoicov
Copy link

Description

I have my Dockerfile in src/main/docker in the project's root folder.
And in pom.xml I've added code to trigger the image building only if a certain parameter is passed.

However, because of the fact I've put the Dockerfile in src/main/docker - the plugin automatically initiates the Docker image building. If the Dockerfile is in another folder - no problem.

So - what parameter(s) should I pass so that it doesn't do this automatically? ... And the logic for triggering the build depends only the CLI parameter I've configured?

PS: The current configuration is somewhat this one:

<image>
	<build>
		<dockerFile>${project.basedir}/src/main/docker/Dockerfile</dockerFile>
		<basedir>${project.basedir}</basedir>
		<contextDir>${project.basedir}</contextDir>
		<tags>
			<tag>${project.version}</tag>
		</tags>
	</build>
</image>

Info

  • docker-maven-plugin version : 4.4.0
  • Maven version (mvn -v) : 3.9.6
  • Docker version : 27.2.0
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

No branches or pull requests

1 participant