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

Improve documentation on referencing build artifacts #233

Merged
merged 1 commit into from
Oct 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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