Skip to content

Commit

Permalink
More code block format fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Feb 8, 2019
1 parent cd9c662 commit 1d4a93b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions maven/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ $ docker build --tag my_local_%%IMAGE%%:3.5.2-jdk-8 .

The local Maven repository can be reused across containers by creating a volume and mounting it in `/root/.m2`.

docker volume create --name maven-repo
docker run -it -v maven-repo:/root/.m2 %%IMAGE%% mvn archetype:generate # will download artifacts
docker run -it -v maven-repo:/root/.m2 %%IMAGE%% mvn archetype:generate # will reuse downloaded artifacts
```console
$ docker volume create --name maven-repo
$ docker run -it -v maven-repo:/root/.m2 %%IMAGE%% mvn archetype:generate # will download artifacts
$ docker run -it -v maven-repo:/root/.m2 %%IMAGE%% mvn archetype:generate # will reuse downloaded artifacts
```

Or you can just use your home .m2 cache directory that you share e.g. with your Eclipse/IDEA:

Expand Down

0 comments on commit 1d4a93b

Please sign in to comment.