Add docker runner env
This commit is contained in:
parent
b55e96c8a5
commit
fbbd2c2035
2
.dockerignore
Normal file
2
.dockerignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
/Dockerfile
|
||||
/docker-compose*
|
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
|||
FROM maven:latest AS builder
|
||||
|
||||
COPY . /src
|
||||
WORKDIR /src
|
||||
|
||||
RUN mvn clean install
|
||||
|
||||
FROM tomcat:8.5
|
||||
ARG PROJECT_NAME=centralino_brigate
|
||||
ARG PROJECT_VERS=0.1.0
|
||||
|
||||
RUN cd /usr/local/tomcat/webapps.dist/ \
|
||||
&& for FILE in *; do \
|
||||
echo "Symlinking: $FILE -> /usr/local/tomcat/webapps/$FILE"; \
|
||||
ln -s $PWD/$FILE /usr/local/tomcat/webapps/$FILE; \
|
||||
done
|
||||
COPY docker/tomcat-users.xml /usr/local/tomcat/conf/
|
||||
COPY docker/host-manager/context.xml /usr/local/tomcat/webapps.dist/host-manager/META-INF/context.xml
|
||||
COPY docker/manager/context.xml /usr/local/tomcat/webapps.dist/manager/META-INF/context.xml
|
||||
COPY --from=builder /src/target/${PROJECT_NAME}-${PROJECT_VERS}.war /usr/local/tomcat/webapps/
|
3
docker/host-manager/context.xml
Normal file
3
docker/host-manager/context.xml
Normal file
|
@ -0,0 +1,3 @@
|
|||
<Context antiResourceLocking="false" privileged="true" >
|
||||
<Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
|
||||
</Context>
|
3
docker/manager/context.xml
Normal file
3
docker/manager/context.xml
Normal file
|
@ -0,0 +1,3 @@
|
|||
<Context antiResourceLocking="false" privileged="true" >
|
||||
<Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
|
||||
</Context>
|
5
docker/tomcat-users.xml
Normal file
5
docker/tomcat-users.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<tomcat-users>
|
||||
<role rolename="admin-gui"/>
|
||||
<user username="unit" password="unit" roles="unit,admin-gui,manager-gui"/>
|
||||
</tomcat-users>
|
Loading…
Reference in New Issue
Block a user