-
Notifications
You must be signed in to change notification settings - Fork 44
Docker with Maven
Somkiat Puisungnoen edited this page Nov 2, 2017
·
1 revision
git clone https://github.com/up1/maven_java_web_example
cd maven_java_web_example
Using the Apache Maven Image
docker container run --rm -v $(pwd):/src \
-w /src \
maven:3.5.2-jdk-8-alpine \
mvn clean package
Using the Apache Tomcat Image
docker container run -d -v $(pwd)/target/api.war:/usr/local/tomcat/webapps/api.war \
-p 8080:8080 \
tomcat:9.0.1-jre8-alpine
and open with URL http://localhost:8080/api/hello