Questions tagged [docker-maven-plugin]

To be used with programming questions that uses docker-maven-plugin ( A Maven plugin for building and pushing Docker images )

The Docker Maven Plugin was the initial Maven plugin used at Spotify for building Docker images out of Java services. This plugin is capable of generating a Dockerfile for you based on configuration in the pom.xml file for things like the FROM image, resources to add with ADD/COPY, etc.

You can use this plugin to create a Docker image with artifacts built from your Maven project. For example, the build process for a Java service can output a Docker image that runs the service.

Note that the authors recommend that new projects use Dockerfile Maven Plugin instead.

73 questions
1
vote
0 answers

how can I build only one imageTag with docker-maven-plugin?

when I am using docker-maven-plugin,I met a problem: part of my pom.xml looks like: com.spotify docker-maven-plugin 0.4.13
johnnywong
  • 11
  • 1
1
vote
1 answer

Can't read user input inside the Docker using Maven plugin

Description I'm writing a simple console application that starts in a Docker container, reads user input and processes it. For automating Docker I use docker-maven-plugin. The code for reading user input is the following: new…
yyunikov
  • 5,719
  • 2
  • 43
  • 78
0
votes
0 answers

How to specify the target for multi-stage docker build through io.fabric8 docker-maven-plugin?

I can pass target in docker-compose.yml to make sure to execute only the stage that I want to in multi-stage docker build. How can I achieve the same with io.fabric8 docker-maven-plugin?
genonymous
  • 1,598
  • 3
  • 18
  • 27
0
votes
1 answer

How can I pass ARG with dots during docker build time?

docker-compose.yml ... args: project.version: 1.0.0 Dockerfile ARG project.version ... LABEL version=${project.version} This throws the following error when I try to build the image through docker-compose. failed to build : failed to process…
genonymous
  • 1,598
  • 3
  • 18
  • 27
0
votes
2 answers

Disable spotify docker-maven-plugin in parent pom

I am using a parent POM like below com.spotify docker-maven-plugin
melontart
  • 28
  • 4
0
votes
1 answer

Docker healthcheck command always returns healthy

I am using the docker-maven-plugin. I am building a Docker container containing a Java command line application. In my healthcheck I am checking that a Java process matching a name exists: pgrep -f "java.*my-app-name.*jar" >…
rmf
  • 625
  • 2
  • 9
  • 39
0
votes
1 answer

Fabric8 Docker Maven Plugin: How to tag just one image? docker:tag

When I use docker:tag of Fabric.io's docker-maven-plugin, it tags all my images: [INFO] --- docker-maven-plugin:0.40.2:tag (tag-latest) @ tracker-service-app --- [INFO] DOCKER> Tagging image dacadoo/db-with-data:latest successful! [INFO] DOCKER>…
Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
0
votes
0 answers

Fabric8 Docker Maven Plugin: docker:tag fails with Cannot invoke "BuildImageConfiguration.cleanupMode()" because "buildConfig" is null

I use FabricIO's Docker Maven Plugin. I'm trying to create a docker tagged image with Docker Maven Pugin. The build goal works, but when trying to tag the image, DMP fails: Execution start of goal io.fabric8:docker-maven-plugin:0.40.2:tag failed:…
Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
0
votes
2 answers

Deploy submodules with dependencies in multi module maven project

I have a project structure like: module-1 pom.xml Dockerfile module-2 pom.xml module-3 pom.xml module-4 pom.xml Dockerfile pom.xml module-2 and module-3 are dependencies for module-1 and module-4 Now I want to deploy…
Anshul
  • 415
  • 4
  • 15
0
votes
1 answer

Pushing image to DockerHub using docker-maven-plugin from Bitbucket Pipelines

I'm trying to setup docker-maven-plugin by fabric8 so I can use it from Bitbucket Pipelines. My pom.xml looks like this: .. .. io.fabric8
Shvalb
  • 1,835
  • 2
  • 30
  • 60
0
votes
0 answers

How to build docker image with spring boot app?

I am trying to build up image with my app but i can't do it correctly. How to create dockerfile if i am using Spring Boot and Java 11? After create dockerfile mvnw spring-boot:build-image is all i need to do?
KK 13
  • 53
  • 5
0
votes
1 answer

Placeholder with defaults syntax

I have a port section in my maven file (docker-maven-plugin section) that looks like this: ${webservice.adminport}:8080 This works fine (uses webservice.adminport if it is defined or defaults to 8080). However, I'm trying to use the…
rmf
  • 625
  • 2
  • 9
  • 39
0
votes
1 answer

fabric8 Maven Plugin Inline Assembly issue

I want to include some JAR files in my Docker image. I'm using the fabric8 maven plugin's inline assembly feature. Here is a the dependency in the POM: org.apache.activemq
ahoffer
  • 6,347
  • 4
  • 39
  • 68
0
votes
1 answer

Is there a way to specify some kind finally action (build-cleanup phase) in Maven?

I'm starting postgres container with maven docker plugin and then use the DB to generate some artefacts in later steps. docker-maven-plugin
alwi
  • 431
  • 6
  • 21
0
votes
1 answer

Unable to cache maven dependency in docker image

I am using the sh file which contains all the maven configuration, secret keys, maven command. when I run the container it downloads the dependency again and again everytime, it is unable to cache the dependency. Here is how my Dockerfile looks like…
Arpit Asati
  • 130
  • 2
  • 16