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
2
votes
1 answer

fabric8io docker-maven-plugin assembly and external artifact

I am trying to create a docker image from within maven which includes artifacts from a different maven project. But the examples I have copied do not appear to be working. I think the problem here is I do not really understand how assemblies work…
Sodved
  • 8,428
  • 2
  • 31
  • 43
2
votes
1 answer

How to add RUN Commands with docker-maven-plugin in pom.xml

I have been using Dockerfile for my project with a sample code like given below. RUN groupadd syslog && apt-get update && apt-get -q install -y curl logrotate iproute2 I would like to convert this to pom.xml so that other micro-services can inherit…
user1401472
  • 2,203
  • 3
  • 23
  • 37
2
votes
1 answer

How to prevent running a docker image each time in docker maven plugin?

My goal is to start an MSSQL Docker container while building my Spring Boot application with docker-maven-plugin only once, so on future running of 'mvn clean install' i want my build to skip trying to start docker container which is running…
Choda92
  • 21
  • 1
  • 6
2
votes
2 answers

container init caused \"rootfs_linux.go:58: mounting to rootfs caused not a directory

I've got a problem with my docker configuration on windows 7. I'm using docker toolbox. Previously my config worked perfectly, but now it cause an error. DOCKER> I/O Error [Unable to start container id [7b5a4bd7ccfd] : OCI runtime create failed:…
2
votes
1 answer

using fabric8 docker-maven-plugin in a Jenkins docker container

I am using fabric8's docker-maven-plugin to build and push my docker image. I do something like: mvn docker:build in both my dev environment and Jenkins. But here is my problem. I have Jenkins running in a docker Swarm. docker service create…
Francisco
  • 145
  • 1
  • 3
  • 13
2
votes
1 answer

Save Multiple docker images into one tar.gz file with maven fabric8 plugin

We are using io.fabric8:docker-maven-plugin:0.27.2 to build docker images. my maven project consist of 3 modules (module1, module2 and module3). Each module builds a docker image based on the dockerfile present within each module. Now, when I run…
Dinesh
  • 1,711
  • 2
  • 20
  • 41
2
votes
3 answers

Tagging created image with dockerfile-maven-plugin

I am using dockerfile-maven-plugin with the following configuration: com.spotify dockerfile-maven-plugin 1.3.6
Maxim Kirilov
  • 2,639
  • 24
  • 49
2
votes
1 answer

docker-maven-plugin from fabric8: connection between tomcat and postgres container

I am using the docker-maven-plugin plugin from fabric8 to setup two containers: Postgres tomcat8 Both containers can be set up separately fine. I can connect from outside (from the host) to both of them. I am doing this as following:
2
votes
1 answer

fabric8 docker-maven-plugin: include additional tags on build

I have the fabric8 docker-maven-plugin configured in my pom.xml as follows: ... ... io.fabric8 docker-maven-plugin
Gabriel Oliveira
  • 790
  • 8
  • 19
2
votes
1 answer

Docker-maven-plugin PostgreSQL - create new database and apply Flyway migrations

I want to use docker-maven-plugin to deploy PostgreSQL container and run some integration tests over it. io.fabric8 docker-maven-plugin 0.20.0
max.kuzmentsov
  • 766
  • 1
  • 10
  • 22
1
vote
1 answer

Deploy image to kubernetes without storing the image in a dockerhub

I'm trying to migrate from docker-maven-plugin to kubernetes-maven-plugin for an test-setup for local development and jenkins-builds. The point of the setup is to eliminate differences between the local development and the jenkins-server. Since…
Roland
  • 5,328
  • 10
  • 37
  • 55
1
vote
1 answer

docker-maven-plugin wait for log

When I do a docker-compose up for a docker-compose.yml containing only a db image version: '3.3' services: db_stations: image: mysql:5.7 ... I can see the following logs: ... db_stations_1 | 2022-02-03T21:54:04.688034Z 0 [Note]…
ldepablo
  • 424
  • 6
  • 19
1
vote
1 answer

Unable to generate Docker image using JKube plugin when executing k8s:build

I'm using Jkube maven plugin to generate a Docker image via a Jenkins pipeline on AWS EC2 instance under Ubuntu. When pipeline executes mvn clean install k8s:build I'm getting this error : [ERROR] Failed to execute goal…
Ghassen
  • 591
  • 1
  • 15
  • 33
1
vote
0 answers

How to dockerize Jhipster monolothic Angular application as docker folder is missing in Client application

I am using latest Jhipster vesion v7.0.1 and generated monolithic client application [angular] and separate monolithic server application. I want to create separate docker image for these two application. But observed that Docker Folder is not…
user3770669
1
vote
1 answer

docker-compose in fabric8's docker-maven-plugin not working

I'm trying to make docker-maven-plugin run redis and PostgreSQL 11 instances inside docker containers prior to integration tests. The following is my setup in the pom.xml file: io.fabric8
curiousdev
  • 626
  • 8
  • 24