-
Notifications
You must be signed in to change notification settings - Fork 643
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
Relax targetDir requirements #1244
Conversation
…ble (e.g. to copy a war to the deployment dir of an app server) Signed-off-by: Tobias Stadler <ts.stadler@gmx.de>
Codecov Report
@@ Coverage Diff @@
## master #1244 +/- ##
============================================
+ Coverage 53.9% 53.91% +<.01%
- Complexity 1637 1638 +1
============================================
Files 155 155
Lines 8249 8250 +1
Branches 1263 1263
============================================
+ Hits 4447 4448 +1
Misses 3359 3359
Partials 443 443
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #1244 +/- ##
============================================
+ Coverage 53.9% 53.91% +<.01%
- Complexity 1637 1638 +1
============================================
Files 155 155
Lines 8249 8250 +1
Branches 1263 1263
============================================
+ Hits 4447 4448 +1
Misses 3359 3359
Partials 443 443
|
Could you please elaborate on your use case ? IIUR this PR should allow for the target directoruy for COPY operation an environment variable so that you get entries in your Dockerfile like
Who would set this environment variable |
In my case I do have a per built docker image with Right now I am using |
@tobiasstadler sorry, I still did not fully get it ;-) Would you mind to share you concrete plugin configuration ? Thanks ! |
Here is a simplified version of what I want to achieve: <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.tobiasstadler</groupId>
<artifactId>docker-maven</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.30.0</version>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<images>
<image>
<name>tobiasstadler/docker-maven</name>
<build>
<from>airhacks/wildfly</from>
<assembly>
<descriptorRef>artifact</descriptorRef>
<targetDir>${DEPLOYMENT_DIR}</targetDir>
</assembly>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
</project> DEPLOYMENT_DIR is "exposed" by the airhacks/wildfly image. |
I see. Using a variable like this in the config might be a bit dangerous because Maven would replace this when this is set in a property. Only when it's unset it's copied over literally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, let's get this in.
It should be possible that targetDir starts with an environment variable (e.g. to copy a war to the deployment dir of an app server)