Skip to content

Instantly share code, notes, and snippets.

@jiang-wei
Last active October 22, 2019 18:25
Show Gist options
  • Save jiang-wei/ae5ced09c7b6a16d7f04e001d9673756 to your computer and use it in GitHub Desktop.
Save jiang-wei/ae5ced09c7b6a16d7f04e001d9673756 to your computer and use it in GitHub Desktop.
run mvn in docker container
#!/bin/bash
set -x
MVN_CMD=${1:-"./mvnw clean package -DskipTests=true -Pprod"}
docker run -it -v `pwd`:/mnt/ -v ~/.m2:/root/.m2 --rm maven /bin/bash -c "cd /mnt && $MVN_CMD"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment