-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathDockerfile
42 lines (33 loc) · 1.48 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
FROM tomcat:7-jre7
MAINTAINER Matthias Grüter <matthias@grueter.name>
# To update, check https://bintray.com/jfrog/artifactory/jfrog-artifactory-oss-zip/view
ENV ARTIFACTORY_VERSION 3.9.4
ENV ARTIFACTORY_SHA1 e42ecd584a56fc14094548a408b61e5bc9bcac42
# Disable Tomcat's manager application.
RUN rm -rf webapps/*
# Redirect URL from / to artifactory/ using UrlRewriteFilter
COPY urlrewrite/WEB-INF/lib/urlrewritefilter.jar /
COPY urlrewrite/WEB-INF/urlrewrite.xml /
RUN \
mkdir -p webapps/ROOT/WEB-INF/lib && \
mv /urlrewritefilter.jar webapps/ROOT/WEB-INF/lib && \
mv /urlrewrite.xml webapps/ROOT/WEB-INF/
# Fetch and install Artifactory OSS war archive.
RUN \
echo $ARTIFACTORY_SHA1 artifactory.zip > artifactory.zip.sha1 && \
curl -L -o artifactory.zip https://bintray.com/artifact/download/jfrog/artifactory/artifactory-${ARTIFACTORY_VERSION}.zip && \
sha1sum -c artifactory.zip.sha1 && \
unzip -j artifactory.zip "artifactory-*/webapps/artifactory.war" -d webapps && \
rm artifactory.zip
# Expose tomcat runtime options through the RUNTIME_OPTS environment variable.
# Example to set the JVM's max heap size to 256MB use the flag
# '-e RUNTIME_OPTS="-Xmx256m"' when starting a container.
RUN echo 'export CATALINA_OPTS="$RUNTIME_OPTS"' > bin/setenv.sh
# Artifactory home
RUN mkdir -p /artifactory
ENV ARTIFACTORY_HOME /artifactory
# Expose Artifactories data, log and backup directory.
VOLUME /artifactory/data
VOLUME /artifactory/logs
VOLUME /artifactory/backup
WORKDIR /artifactory