Comments (17)
remove targetPath tag
from docker-maven-plugin.
In case you can't wait for that PR, here is a workaround I came up with:
<!-- define a default value in <properties> ->
<properties>
...
<docker.resource.targetPath>/</docker.resource.targetPath>
</properties>
<!-- define a profile that is activated in windows environments -->
<profiles>
<profile>
<id>windows</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<properties>
<docker.resource.targetPath></docker.resource.targetPath>
</properties>
</profile>
</profiles>
<!-- then set the targetPath using the property -->
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.2.12</version>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<dockerDirectory>src/main/docker</dockerDirectory>
<resources>
<resource>
<targetPath>${docker.resource.targetPath}</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
...
Hope this helps.
from docker-maven-plugin.
I was facing the same issue. Upgraded to 0.3.9 version and no longer facing the issue.
from docker-maven-plugin.
@arghya88 your suggestion worked great for me
from docker-maven-plugin.
If you want to copy your resources to a specific folder in the docker image you will need targetPath. In this case it is still a problem.
/opt/${project.artifactId} -- Fails in windows
from docker-maven-plugin.
What happens if you use backslashes in the targetPath?
from docker-maven-plugin.
I'm running into this issue too on version 0.2.11. I've tried:
/
${file.separator}
/
/
//
Any helpers or work arounds would be great.
from docker-maven-plugin.
I have not tested it yet, but it looks like someone has made a fix. It's waiting in a PR
https://github.com/oberthur/docker-maven-plugin/commit/1f303e0aeb76aee5122d6d7bda4cd240518a6337
from docker-maven-plugin.
I've now tested oberthur's fork and it works for me on windows. The change is in #65
from docker-maven-plugin.
@BrettFieber this worked for me, thanks
from docker-maven-plugin.
This should be resolved by https://github.com/spotify/docker-maven-plugin/pull/121/commits
from docker-maven-plugin.
I just tried this with 0.3.5 on Windows. It's still broken.
from docker-maven-plugin.
Not that it helps for the spotify plugin, but one I've found that works on windows is https://github.com/rhuss/docker-maven-plugin
Good luck.
from docker-maven-plugin.
Reopening this based on reports that it doesn't work. We welcome PR's but are unlikely to fix this at Spotify, since nobody has a Windows setup to test it out with.
from docker-maven-plugin.
I ran into this same issue, and have created a PR that works around the issue (its actually a bug in the Windows implementation of Paths.get)
from docker-maven-plugin.
@javacody do you still have issues with 0.3.9-SNAPSHOT? If so can you tell us the output of running your maven commands with the -e
flag?
from docker-maven-plugin.
@sunieldalal thanks for the confirmation!
from docker-maven-plugin.
Related Issues (20)
- Not working with jdk11 HOT 4
- Failed to execute goal com.spotify:docker-maven-plugin:1.2.0:build HOT 5
- Problem connecting to Docker on Vagrant HOT 1
- 推送镜像至私服时,即使设置的imageTag,仍然会生成一个latest的tag,且两个tag的镜像id相同,如何设置才能覆盖latest的tag而只生成自己设置的tag呢 HOT 2
- how can i get git commit Id in lables
- =>
- Show Sending build context to Docker daemon ***GB HOT 1
- com.spotify.docker.client.shaded.org.glassfish.jersey.message.internal.MessageBodyProviderNotFoundException: MessageBodyReader not found for media type=text/html HOT 3
- k8s gitlab runner dose not work with docker maven plugin
- Authentication usernamenot support chinese HOT 1
- Support for Red Hat Enterprise Linux 8? HOT 1
- Can this plugin be used to publish docker image to docker.pkg.github.com HOT 1
- Status? HOT 1
- Schema specific part is opaque HOT 1
- Failed to execute goal com.spotify:docker-maven-plugin:1.0.0:build (default-cli) on project HOT 3
- Remote DOCKER_HOST configuration does not work with ssh protocol HOT 3
- How to building Docker Image in Maven Project of multi-module HOT 2
- gitlab ci not execute deploy with docker maven plugin HOT 1
- push image to registry fail HOT 1
- I am using docker maven plugin and I made intentionally error in application (bean creation exception) but always I am getting error in generic was saying Docker IO error [ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.32.0:start (docker-start) on project captcha-validator-integration-test: I/O Error: [***.azurecr.io/ssib/captcha-validator-service:1.2.0-SNAPSHOT] "service-captcha-validator": Timeout after 120460 ms while waiting on log out 'Started CaptchaValidatorApplication' -> [Help 1] [ERROR] [ERROR] How to display actual error in logs?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-maven-plugin.