-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
61 lines (46 loc) · 2.12 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
52
53
54
55
56
57
58
59
60
61
FROM adoptopenjdk:8u212-b03-jdk-hotspot
LABEL maintainer="[email protected]"
# Setup useful environment variables
ENV JIRA_HOME /var/atlassian/application-data/jira
ENV JIRA_INSTALL /opt/atlassian/jira
ENV JIRA_VERSION 7.13.8
ENV JIRA_DOWNLOAD_URL https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-core-${JIRA_VERSION}.tar.gz
LABEL Description="This image is used to start Atlassian JIRA" Vendor="Atlassian" Version="${JIRA_VERSION}"
# Use the default unprivileged account. This could be considered bad practice
# on systems where multiple processes end up being executed by 'daemon' but
# here we only ever run one process anyway.
ENV RUN_USER daemon
ENV RUN_GROUP daemon
# User configurable environment variables
ENV CHECK_LOCK_FILE=true
ENV CATALINA_CONNECTOR_PROXYNAME=
ENV CATALINA_CONNECTOR_PROXYPORT=
ENV CATALINA_CONNECTOR_SCHEME=
# download requirements
RUN apt-get update -y && \
apt-get install -y xmlstarlet fontconfig && \
rm -rf /var/lib/apt/lists/*
# download jira
RUN mkdir -p "${JIRA_HOME}" && \
chmod -R 700 "${JIRA_HOME}" &&\
chown ${RUN_USER}:${RUN_GROUP} "${JIRA_HOME}" && \
mkdir -p "${JIRA_INSTALL}" && \
curl -Ls "${JIRA_DOWNLOAD_URL}" | tar -xz --directory "${JIRA_INSTALL}" --strip-components=1 --no-same-owner && \
echo -e "\njira.home=${JIRA_HOME}" > "${JIRA_INSTALL}/atlassian-jira/WEB-INF/classes/jira-application.properties" && \
mv "${JIRA_INSTALL}/conf/server.xml" "${JIRA_INSTALL}/conf/server.xml.orig"
# fix permissions on jira install folder
RUN chmod -R 700 "${JIRA_INSTALL}" && \
chown -R ${RUN_USER}:${RUN_GROUP} "${JIRA_INSTALL}"
# Use the default unprivileged account. This could be considered bad practice
# on systems where multiple processes end up being executed by 'daemon' but
# here we only ever run one process anyway.
#USER ${RUN_USER}:${RUN_GROUP}
# Expose default HTTP connector port.
EXPOSE 8080
# Set the default working directory as the JIRA installation directory.
WORKDIR ${JIRA_INSTALL}
# install the entrypoint
COPY entrypoint /entrypoint
RUN chmod 755 /entrypoint
# start
ENTRYPOINT ["/entrypoint"]