2015-07-09 10:33:43 +00:00
|
|
|
#!/bin/bash
|
2016-05-25 03:21:50 +00:00
|
|
|
set -exo pipefail
|
2015-07-09 10:33:43 +00:00
|
|
|
|
2016-05-25 03:21:50 +00:00
|
|
|
cd "$(dirname ${BASH_SOURCE})"
|
2015-07-09 10:33:43 +00:00
|
|
|
|
2016-05-25 03:21:50 +00:00
|
|
|
maven_cache_repo="${HOME}/.m2/repository"
|
2015-07-09 10:33:43 +00:00
|
|
|
|
2016-05-25 03:21:50 +00:00
|
|
|
mkdir -p "${maven_cache_repo}"
|
2015-07-09 10:33:43 +00:00
|
|
|
|
2016-05-25 03:21:50 +00:00
|
|
|
docker run --rm -it \
|
2015-07-09 10:33:43 +00:00
|
|
|
-w /gen \
|
2016-05-25 03:21:50 +00:00
|
|
|
-e GEN_DIR=/gen \
|
2017-05-31 08:17:42 +00:00
|
|
|
-e MAVEN_CONFIG=/var/maven/.m2 \
|
2017-06-26 10:29:47 +00:00
|
|
|
-u "$(id -u):$(id -g)" \
|
2015-07-09 10:33:43 +00:00
|
|
|
-v "${PWD}:/gen" \
|
2017-05-31 08:17:42 +00:00
|
|
|
-v "${maven_cache_repo}:/var/maven/.m2/repository" \
|
2016-05-25 03:21:50 +00:00
|
|
|
--entrypoint /gen/docker-entrypoint.sh \
|
|
|
|
maven:3-jdk-7 "$@"
|