forked from mattgruter/dockerfile-artifactory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (30 loc) · 1.3 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
FROM tomcat:8-jre8
MAINTAINER Gabriel Caires <[email protected]>
# To update, check https://bintray.com/jfrog/artifactory/artifactory/view
ENV ARTIFACTORY_VERSION 3.3.0
# 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 \
wget -O artifactory.zip https://bintray.com/artifact/download/jfrog/artifactory/artifactory-${ARTIFACTORY_VERSION}.zip && \
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