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 to use only one docker-maven-plugin configuration for Docker container and Docker host?

My Spring Boot application uses ElasticSearch, therefore I have to start an instance of ElasticSearch for integration testing. To start the Docker container of ElasticSearch I use docker-maven-plugin. The integration test should work on GitLab and…
dur
  • 15,689
  • 25
  • 79
  • 125
1
vote
0 answers

Create a Docker File and Building a Docker-Image with maven and spring-boot on Windows

I need to create a docker file and build docker image for maven project with including the setting.xml from conf/settigs.xml (For remote repository configuration) So I'm trying to learn how to use maven, spring-boot and docker to create a…
Debugger
  • 690
  • 1
  • 18
  • 41
1
vote
0 answers

volumes in docker-maven-plugin not binding

I am using docker-maven-plugin to run an image from a remote repository. The image is running using docker:start but it seems like the volumes not working. I run the command using groovy (jenkins): sh(script:"mvn -B -gs ${cfg} -f lib/pom.xml…
1
vote
2 answers

fabric8:docker-maven-plugin cannot load the ffi provider when running on Centos7 in Jenkins

After adding fabric8 to a hello world pom, when running maven "clean install" in Jenkins on CentOS7, io.fabric8 docker-maven-plugin
Dave Brunkow
  • 352
  • 6
  • 20
1
vote
1 answer

Passing environment variables across stages in docker multistage image

I have a docker image which has 4 lower layers. I want to reduce the size of my current image layer using multistage, but this causes a loss of environment, port and cmd config properties across the stages. Is there a way to pass on such config…
1
vote
0 answers

Passing placeholders to docker image built from docker-maven-plugin (io.fabric8)

Im building a docker image from maven using io.fabric8:docker-maven-plugin. i want the container to run like : java -jar -Dspring.profiles.active=prod /maven/myapp-1.4.3.jar java -jar -Dspring.profiles.active=dev /maven/myapp-1.4.3.jar so i…
chenchuk
  • 5,324
  • 4
  • 34
  • 41
1
vote
1 answer

Docker Containers for Maven Multi-module Spring Boot project with Angular Frontend module

I have Maven Multi-Modules Project (Angular Frontend Module + SpringBoot Backend Module) residing under same Parent Maven Project. I want to run the application in Docker Multi-containers (docker container for Frontend + docker container for Backend…
1
vote
2 answers

Docker image not getting image name from pom.xml

I am creating the docker image using spotify. My docker image is creating successfully but w/o a name. I am getting below on console: Image will be built without a name POM.XML org.springframework.boot
1
vote
1 answer

How do I build 2 docker images from maven, in separate phases?

I use io.fabric8:docker-maven-plugin:0.28.0 in a Maven project and I need to build 2 different Docker images, in different phases: One for the integration-test phase, to run some database for the integration tests. I would build it with some…
Cos64
  • 1,617
  • 2
  • 19
  • 30
1
vote
2 answers

spotify docker/dockerfile maven plugin [ERROR] Copy failed

I am trying to execute the mvn clean package docker:build on my project it fails with the following error ERROR] Failed to execute goal com.spotify:docker-maven-plugin:1.1.0:build (default-cli) on project mma-access-management-auth-server:…
1
vote
1 answer

How pass -t parameter to fabric8 docker-maven-plugin?

Here is plugin definition: io.fabric8 docker-maven-plugin 0.26.0
Cherry
  • 31,309
  • 66
  • 224
  • 364
1
vote
2 answers

How just build docker image from Dockerfile with fabric8 docker-maven-plugin?

Here is a plugin defintion: io.fabric8 docker-maven-plugin 0.26.0
Cherry
  • 31,309
  • 66
  • 224
  • 364
1
vote
1 answer

Reading environment variable in jar from docker container

I'm using docker-maven-plugin and as per the documentation I need to pass environment variable file via . So the plugin in pom.xml looks like ...
Mad-D
  • 4,479
  • 18
  • 52
  • 93
1
vote
2 answers

Maven, Docker get the actual IP address of host system

With Maven and docker-maven-plugin I have configured Apache Kafka + ZooKeeper containers: wurstmeister/zookeeper:${zookeeper.version} zookeeper
alexanoid
  • 24,051
  • 54
  • 210
  • 410
1
vote
1 answer

How can I configure com.spotify.dockerfile-maven-plugin to run on Docker Toolbox?

I started out using the com.spotify.docker-maven-plugin, but it's wiki on GitHub says to switch to com.spotify.dockerfile-maven-plugin. However in the first plugin I'm able to specify the Docker Host, but I can't figure out how to it with the…
Timo
  • 2,212
  • 2
  • 25
  • 46