Skip to content

Commit

Permalink
Improve documentation on referencing build artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
boskoop committed Oct 17, 2018
1 parent 118ae04 commit 67b861b
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 spotify/dockerfile-maven#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 67b861b

Please sign in to comment.