#FROM anapsix/alpine-java:8_jdk FROM debian:buster MAINTAINER Atlassian Jira Server Team 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 # fix errors RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections RUN apt-get update && apt-get install -y --allow-unauthenticated ca-certificates gnupg sudo apt-transport-https lsb-release apt-utils openjdk-8-jdk openjdk-8-jre locales console-cyrillic wget curl bash procps openssl perl ttf-dejavu tini util-linux ENV RUN_USER bin ENV RUN_GROUP bin # 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}"] # Expose HTTP port EXPOSE 8080 WORKDIR $JIRA_HOME CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] #installing utils RUN apt-get update && apt-get install -y --allow-unauthenticated htop mc tmux iftop cmatrix iputils-ping cmatrix-xfont lsof lynx COPY entrypoint.sh /entrypoint.sh ARG JIRA_VERSION=8.0.2 ARG DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-${JIRA_VERSION}.tar.gz 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}/ \ && 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