-
Notifications
You must be signed in to change notification settings - Fork 642
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
Dockerize generic Spring boot app with maven plugin #339
Comments
Try something like this in the build configuration: <build>
<from>${image}</from>
<assembly>
<basedir>/</basedir>
<inline>
<id>spring-boot-jar</id>
<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<includes>
<include>mygroup:app</include>
</includes>
<outputDirectory>.</outputDirectory>
<outputFileNameMapping>app.jar</outputFileNameMapping>
</dependencySet>
</dependencySets>
</inline>
</assembly>
</build> Note the
BTW, soon we will extend direct Dockerfile support with placeholders, also for an assembly so things might get even easier. |
@rhuss Thanks a lot for the fast answer. I am getting the following error:
With the following config <build>
<from>java:8</from>
<assembly>
<basedir>/</basedir>
<inline>
<id>spring-boot-jar</id>
<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<includes>
<include>${project.groupId}:${project.artifactId}</include>
</includes>
<outputDirectory>.</outputDirectory>
<outputFileNameMapping>app.jar</outputFileNameMapping>
</dependencySet>
</dependencySets>
</inline>
</assembly>
</build> |
Btw i am running |
Okay. Fail detection complete. Do NEVER run the docker:build target on compile time :/ Thanks, this above example works! |
integrate revamped authentication support from docker-client
Hi!
I did some testing but cannot achive the following:
A Spring Boot app consists only of a runnable Jar. So the Dockerfile as suggested by Spring itself as follows:
I want to transform this into
<build></build>
to *get rid of the Dockerfile and make use of the many nice maven properties.Now, i am still hanging on putting the resulting
artifact-0.0.1-SNAPSHOT.jar
asapp.jar
to the docker container.S/o got any help? How do i configure my assembly?
Yes, i read http://ro14nd.de/docker-maven-plugin/docker-build.html but i do not understand the handling of assemblyDescriptorRef and such.
The text was updated successfully, but these errors were encountered: