Skip to content

Commit

Permalink
Don't export exportDir if it is / (see #62)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhuss committed Dec 5, 2014
1 parent f53917e commit 9898440
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ New configuration syntax with support for multiple containers
- Add property based configuration for images (#42)
- Add new goal `docker:logs` for showing logs of configured containers (#49)
- Support for showing logs during `docker:start` (#8)
- Use `COPY` instead of `ADD` when putting a Maven assembly into the container (#53)
- If `exportDir` is `/` then do not actually export (since it doesn't make much sense) (see #62)

* **0.10.4**
- Restructured and updated documentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public String content() {

// Entries
for (AddEntry entry : addEntries) {
b.append("ADD ").append(entry.source).append(" ")
b.append("COPY ").append(entry.source).append(" ")
.append(exportDir).append("/").append(entry.destination).append("\n");
}

Expand All @@ -78,7 +78,10 @@ public String content() {
}

// Volume export
b.append("VOLUME [\"").append(exportDir).append("\"]\n");
if (!"/".equalsIgnoreCase(exportDir)) {
// Dont export a top level export dir
b.append("VOLUME [\"").append(exportDir).append("\"]\n");
}

// Environment variable support
for (Map.Entry<String,String> entry : envEntries.entrySet()) {
Expand Down

0 comments on commit 9898440

Please sign in to comment.