-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_wget
39 lines (31 loc) · 1.32 KB
/
Dockerfile_wget
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
FROM anapsix/alpine-java
MAINTAINER Enrico Gargale <[email protected]>
ENV JAVA_VERSION=7 \
JAVA_UPDATE=80 \
JAVA_BUILD=15 \
JAVA_HOME="/opt/jdk/jre" \
LANG=C.UTF-8 \
GLIBC_VERSION=2.23-r3 \
CATALINA_HOME=/opt/apache-tomcat-7.0.100 \
PATH=$CATALINA_HOME/bin:$PATH
RUN apk upgrade --update && \
apk add curl && \
mkdir -p /opt && \
mkdir -p /data && \
curl -jksSL -o /tmp/tomcat.tar.gz https://mirror.ibcp.fr/pub/apache/tomcat/tomcat-7/v7.0.100/bin/apache-tomcat-7.0.100.tar.gz && \
gunzip /tmp/tomcat.tar.gz && \
tar -C /opt -xf /tmp/tomcat.tar && \
rm -rf $CATALINA_HOME/webapps/* && \
wget -O $CATALINA_HOME/webapps/mailarchiva.war https://d3tlkwz0u312l3.cloudfront.net/download?id=2251 && \
mkdir -p /var/opt/mailarchiva/tomcat/ROOT && \
unzip $CATALINA_HOME/webapps/mailarchiva.war -d /var/opt/mailarchiva/tomcat/ROOT && \
sed -i 's@port=\"8080\" protocol\=\"HTTP\/1.1@port=\"80\" protocol\=\"org.apache.coyote.http11.Http11NioProtocol@g' $CATALINA_HOME/conf/server.xml && \
rm -rf /tmp/* /var/cache/apk/*
COPY ./server.xml $CATALINA_HOME/conf/server.xml
# Define working directory.
EXPOSE 80
WORKDIR $CATALINA_HOME
#Set default argument for entry point
CMD ["run"]
#Defining what our container runs
ENTRYPOINT ["/opt/apache-tomcat-7.0.100/bin/catalina.sh"]