docker-scripts/jira/latest/Dockerfile

38 lines
1.6 KiB
Docker
Raw Normal View History

2018-09-18 13:44:55 +03:00
FROM anapsix/alpine-java:8_jdk
MAINTAINER Atlassian Jira Server Team
ENV RUN_USER daemon
ENV RUN_GROUP daemon
2018-09-18 21:32:07 +03:00
# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files
2018-09-18 13:44:55 +03:00
ENV JIRA_HOME /var/atlassian/application-data/jira
ENV JIRA_INSTALL_DIR /opt/atlassian/jira
VOLUME ["${JIRA_HOME}"]
2018-09-18 21:32:07 +03:00
# Expose HTTP port
2018-09-18 15:29:01 +03:00
EXPOSE 8080
2018-09-18 13:44:55 +03:00
WORKDIR $JIRA_HOME
CMD ["/entrypoint.sh", "-fg"]
ENTRYPOINT ["/sbin/tini", "--"]
2018-09-18 21:32:07 +03:00
RUN apk add --no-cache wget curl openssh bash procps openssl perl ttf-dejavu tini util-linux mc htop \
2018-09-18 13:44:55 +03:00
&& rm -rf /var/lib/{apt,dpkg,cache,log}/ /tmp/* /var/tmp/*
COPY entrypoint.sh /entrypoint.sh
ARG JIRA_VERSION=7.12.1
2018-09-18 21:32:07 +03:00
ARG DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-${JIRA_VERSION}.tar.gz
2018-09-18 13:44:55 +03:00
COPY . /tmp
RUN mkdir -p ${JIRA_INSTALL_DIR} \
&& curl -L --silent ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \
&& chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \
2018-09-18 21:32:07 +03:00
&& sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \
&& sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \
&& sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \
2018-09-18 17:18:00 +03:00
&& sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml