2019-04-01 16:47:55 +03:00
|
|
|
FROM debian:buster
|
2018-09-18 13:44:55 +03:00
|
|
|
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
|
|
|
|
|
2019-04-01 16:47:55 +03:00
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
|
|
|
#editing sources list
|
|
|
|
RUN rm /etc/apt/sources.list
|
|
|
|
COPY sources.list /etc/apt/sources.list
|
|
|
|
COPY locale.gen /etc/locale.gen
|
|
|
|
|
|
|
|
#installing utils
|
|
|
|
# url: missing
|
|
|
|
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
|
|
|
RUN apt-get update && apt-get install -y --allow-unauthenticated gnupg2
|
|
|
|
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
|
|
|
|
RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu disco main" | tee /etc/apt/sources.list.d/webupd8team-java.list
|
|
|
|
RUN echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu disco main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
|
|
|
|
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
|
|
|
|
RUN apt-get update && apt-get install -y --allow-unauthenticated htop mc tmux iftop cmatrix iputils-ping oracle-java8-set-default cmatrix-xfont lsof lynx ca-certificates gnupg sudo apt-transport-https lsb-release apt-utils oracle-java8-installer locales console-cyrillic wget curl bash procps openssl perl ttf-dejavu tini util-linux fontconfig
|
|
|
|
|
2018-09-18 13:44:55 +03:00
|
|
|
VOLUME ["${JIRA_HOME}"]
|
2019-04-01 16:47:55 +03:00
|
|
|
WORKDIR $JIRA_HOME
|
2018-09-18 13:44:55 +03:00
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
CMD ["/entrypoint.sh", "-fg"]
|
2019-04-01 16:47:55 +03:00
|
|
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
2018-09-18 13:44:55 +03:00
|
|
|
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
|
|
|
2019-04-01 16:47:55 +03:00
|
|
|
#After install fixes
|
|
|
|
RUN localedef en_US.UTF-8 -i en_US -f UTF-8
|
|
|
|
RUN update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
|
|
|
|
RUN apt update
|
|
|
|
RUN apt upgrade -y
|
|
|
|
RUN apt dist-upgrade -y
|
|
|
|
RUN apt-get clean autoclean
|
|
|
|
RUN apt-get autoremove -y
|
|
|
|
RUN rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2018-09-18 17:45:59 +03:00
|
|
|
ARG JIRA_VERSION=7.10.0
|
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
|