Add docker runner env

This commit is contained in:
sfigato 2020-04-27 00:03:38 +02:00
parent b55e96c8a5
commit fbbd2c2035
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F
5 changed files with 33 additions and 0 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
/Dockerfile
/docker-compose*

20
Dockerfile Normal file
View 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/

View 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>

View 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
View 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>