openapi-generator/run-in-docker.sh

17 lines
363 B
Bash
Raw Normal View History

2015-07-09 10:33:43 +00:00
#!/bin/bash
set -exo pipefail
2015-07-09 10:33:43 +00:00
cd "$(dirname ${BASH_SOURCE})"
2015-07-09 10:33:43 +00:00
maven_cache_repo="${HOME}/.m2/repository"
2015-07-09 10:33:43 +00:00
mkdir -p "${maven_cache_repo}"
2015-07-09 10:33:43 +00:00
docker run --rm -it \
2015-07-09 10:33:43 +00:00
-w /gen \
-e GEN_DIR=/gen \
2015-07-09 10:33:43 +00:00
-v "${PWD}:/gen" \
-v "${maven_cache_repo}:/root/.m2/repository" \
--entrypoint /gen/docker-entrypoint.sh \
maven:3-jdk-7 "$@"