mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2024-12-27 15:15:42 +03:00
64 lines
2.9 KiB
Docker
64 lines
2.9 KiB
Docker
FROM epicmorg/prod:jdk8
|
|
LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org"
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
##################################################################
|
|
# Build-time metadata as defined at http://label-schema.org
|
|
##################################################################
|
|
ARG BUILD_DATE=today
|
|
ARG VCS_REF=master
|
|
ARG VERSION=latest
|
|
LABEL org.label-schema.build-date=$BUILD_DATE \
|
|
org.label-schema.name="Docker Scripts" \
|
|
org.label-schema.description="Image for our docker containers." \
|
|
org.label-schema.url="https://ww.epicm.org/" \
|
|
org.label-schema.vcs-ref=$VCS_REF \
|
|
org.label-schema.vcs-url="https://github.com/EpicMorg/docker-scripts" \
|
|
org.label-schema.vendor="EpicMorg" \
|
|
org.label-schema.version=$VERSION \
|
|
org.label-schema.schema-version="1.0"
|
|
|
|
##################################################################
|
|
# ARGuments
|
|
##################################################################
|
|
ARG JIRA_VERSION=8.6.1
|
|
ARG DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-${JIRA_VERSION}.tar.gz
|
|
|
|
##################################################################
|
|
# Setup
|
|
##################################################################
|
|
ENV RUN_USER daemon
|
|
ENV RUN_GROUP daemon
|
|
|
|
# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files
|
|
ENV JIRA_HOME /var/atlassian/application-data/jira
|
|
ENV JIRA_INSTALL_DIR /opt/atlassian/jira
|
|
|
|
VOLUME ["${JIRA_HOME}"]
|
|
WORKDIR $JIRA_HOME
|
|
|
|
# Expose HTTP port
|
|
EXPOSE 8080
|
|
|
|
##################################################################
|
|
# Installing
|
|
##################################################################
|
|
RUN mkdir -p ${JIRA_INSTALL_DIR} \
|
|
&& curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \
|
|
&& chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \
|
|
&& 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 \
|
|
&& sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \
|
|
|
|
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
|
|
apt clean -y && \
|
|
apt autoclean -y && \
|
|
rm -rfv /var/lib/apt/lists/* && \
|
|
rm -rfv /var/cache/apt/archives/*.deb
|
|
|
|
CMD ["/entrypoint.sh", "-fg"]
|
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
COPY . /tmp
|