This repository was archived by the owner on Jul 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (36 loc) · 2.07 KB
/
Dockerfile
File metadata and controls
45 lines (36 loc) · 2.07 KB
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
FROM bitweb/java:8
MAINTAINER BitWeb
# JIRA variables
ENV JIRA_HOME /var/atlassian/jira
ENV JIRA_INSTALL /opt/atlassian/jira
ENV JIRA_VERSION 7.12.0
ENV DOWNLOAD_URL https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-${JIRA_VERSION}.tar.gz
# MySQL Connector
ENV CONNECTOR_VERSION 5.1.46
ENV CONNECTOR_DOWNLOAD_URL https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${CONNECTOR_VERSION}.tar.gz
#################################################
#### No need to edit below this line ####
#################################################
# Install JIRA dependencies
RUN apt-get update && apt-get -y install --no-install-recommends curl htop
# Install JIRA and helper tools and setup initial home directory structure
RUN mkdir -p ${JIRA_HOME} \
&& mkdir -p ${JIRA_HOME}/caches/indexes \
&& chmod -R 700 ${JIRA_HOME} \
&& mkdir -p ${JIRA_INSTALL}/conf/Catalina \
&& curl -Ls ${DOWNLOAD_URL} | tar -xz --directory ${JIRA_INSTALL} --strip-components=1 --no-same-owner \
&& curl -Ls ${CONNECTOR_DOWNLOAD_URL} | tar -xz --directory ${JIRA_INSTALL}/lib --strip-components=1 --no-same-owner "mysql-connector-java-$CONNECTOR_VERSION/mysql-connector-java-$CONNECTOR_VERSION-bin.jar" \
&& chmod -R 700 ${JIRA_INSTALL}/conf \
&& chmod -R 700 ${JIRA_INSTALL}/logs \
&& chmod -R 700 ${JIRA_INSTALL}/temp \
&& chmod -R 700 ${JIRA_INSTALL}/work \
&& echo -e "\njira.home=$JIRA_HOME" >> ${JIRA_INSTALL}/atlassian-jira/WEB-INF/classes/jira-application.properties
# Set Catalina PID location
# Todo: Still does not fix the error with stop-jira.sh: $CATALINA_PID was set but the specified file does not exist. Is Tomcat running? Stop aborted.
RUN sed -i "1iCATALINA_PID=\"$JIRA_INSTALL/work/catalina.pid\"\nexport CATALINA_PID" ${JIRA_INSTALL}/bin/setenv.sh
# Set the default working directory as the installation directory.
WORKDIR $JIRA_INSTALL
# Expose default HTTP connector port.
EXPOSE 8080
# Startup
CMD ["./bin/start-jira.sh", "-fg"]