Skip to content

Commit

Permalink
building coceso-app docker image with maven-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
heinrichmartin committed Jan 11, 2018
1 parent 9fe4da4 commit df59bdf
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ ports.properties
# ignore compilation output
target

# ignore private maven cache
.m2

# ignore bower cache
bower_components

Expand Down
4 changes: 4 additions & 0 deletions docker/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
BASE=$(dirname $(dirname $(readlink -en $0)))

docker run -it --rm -v "$BASE:/usr/src/mymaven" -w /usr/src/mymaven maven:alpine mvn package
4 changes: 4 additions & 0 deletions docker/build_cached
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
BASE=$(dirname $(dirname $(readlink -en $0)))

docker run -it --rm -v "$BASE:/usr/src/mymaven" -v "$BASE/.m2:/root/.m2" -w /usr/src/mymaven maven:alpine mvn package
4 changes: 4 additions & 0 deletions docker/build_image
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
BASE=$(dirname $(dirname $(readlink -en $0)))

docker build -t coceso-app "$BASE/main/view/target/"
2 changes: 2 additions & 0 deletions main/view/target/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!coceso.war
3 changes: 3 additions & 0 deletions main/view/target/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM tomcat:alpine

COPY coceso.war /usr/local/tomcat/webapps/

0 comments on commit df59bdf

Please sign in to comment.