Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Commit

Permalink
Merge pull request #233 from boskoop/master
Browse files Browse the repository at this point in the history
Improve documentation on referencing build artifacts
  • Loading branch information
mattnworb authored Oct 17, 2018
2 parents 118ae04 + ab0c3fb commit d6bc25a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@ ARG JAR_FILE
ADD target/${JAR_FILE} /usr/share/myservice/myservice.jar
```

**Important note**

The most Maven-ish way to reference the build artifact would probably
be to use the `project.build.directory` variable for referencing the
'target'-directory. However, this results in an absolute path, which
is not supported by the ADD command in the Dockerfile. Any such source
must be inside the *context* of the Docker build and therefor must be
referenced by a *relative path*. See https://github.com/spotify/dockerfile-maven/issues/101

*Do **not** use `${project.build.directory}` as a way to reference your
build directory.*

## What does it give me?

There are many advantages to using this plugin for your builds.
Expand Down

0 comments on commit d6bc25a

Please sign in to comment.