-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (39 loc) · 1.77 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM tomcat:9.0.85-jdk11-temurin
# Args
ARG GN_DIR
ENV GN_DIR $GN_DIR
ARG GN_FILE
ENV GN_FILE $GN_FILE
ARG ENTORNO
ENV ENTORNO $ENTORNO
# Java Certs IDE de Andalucia,Junta de Andalucia
RUN </dev/null openssl s_client -connect www.ideandalucia.es:443 -servername ideandalucia | openssl x509 > /tmp/ideandalucia.crt
RUN </dev/null openssl s_client -connect www.juntadeandalucia.es:443 -servername juntadeandalucia | openssl x509 > /tmp/juntadeandalucia.crt
RUN cd $JAVA_HOME/lib/security && \
keytool -keystore cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias ideandalucia -file /tmp/ideandalucia.crt
RUN cd $JAVA_HOME/lib/security && \
keytool -keystore cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias juntadeandalucia -file /tmp/juntadeandalucia.crt
WORKDIR /
RUN apt-get -y update && \
apt-get -y install --no-install-recommends \
curl \
unzip
COPY $GN_FILE /tmp
RUN mkdir -p $GN_DIR && \
unzip -e /tmp/$GN_FILE -d $GN_DIR && \
rm /tmp/$GN_FILE
COPY custom/ $GN_DIR/
COPY medioambiente#geoinspire.xml $CATALINA_HOME/conf/Catalina/localhost/
# Comprobacion de entorno para copia de logo
RUN if [ "$ENTORNO" = "integracion" ]; then \
mv $GN_DIR/catalog/views/default/images/logo_rediam_INT.png $GN_DIR/catalog/views/default/images/logo_rediam.png && \
rm $GN_DIR/catalog/views/default/images/logo_rediam_PRU.png; \
elif [ "$ENTORNO" = "pruebas" ]; then \
mv $GN_DIR/catalog/views/default/images/logo_rediam_PRU.png $GN_DIR/catalog/views/default/images/logo_rediam.png && \
rm $GN_DIR/catalog/views/default/images/logo_rediam_INT.png; \
fi
# Tomcat EntryPoint
COPY ./docker-entrypoint.sh /entrypoint.sh
RUN ["chmod", "+x", "/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["catalina.sh", "run"]