From 37e9e38dc806634a343d560f38dd24ce45a43756 Mon Sep 17 00:00:00 2001 From: STAM Date: Sat, 8 Feb 2025 15:23:37 +0300 Subject: [PATCH] temp --- Makefile | 1 - .../atlassian/confluence/9/9.2.0/Dockerfile | 48 ++++++++++++++++++ .../confluence/9/9.2.0/Dockerfile.jdk11 | 49 +++++++++++++++++++ .../confluence/9/9.2.0/Dockerfile.jdk17 | 49 +++++++++++++++++++ .../atlassian/confluence/9/9.2.0/Makefile | 36 ++++++++++++++ .../confluence/9/9.2.0/docker-compose.yml | 16 ++++++ .../confluence/9/9.2.0/entrypoint.sh | 39 +++++++++++++++ 7 files changed, 237 insertions(+), 1 deletion(-) create mode 100644 linux/ecosystem/atlassian/confluence/9/9.2.0/Dockerfile create mode 100644 linux/ecosystem/atlassian/confluence/9/9.2.0/Dockerfile.jdk11 create mode 100644 linux/ecosystem/atlassian/confluence/9/9.2.0/Dockerfile.jdk17 create mode 100644 linux/ecosystem/atlassian/confluence/9/9.2.0/Makefile create mode 100644 linux/ecosystem/atlassian/confluence/9/9.2.0/docker-compose.yml create mode 100755 linux/ecosystem/atlassian/confluence/9/9.2.0/entrypoint.sh diff --git a/Makefile b/Makefile index 409f06961..5189115ad 100644 --- a/Makefile +++ b/Makefile @@ -2282,7 +2282,6 @@ ecosystem-jira-9-lts-images: cd `pwd`/linux/ecosystem/atlassian/jira/9/9.4.10 && pwd && make build && make deploy cd `pwd`/linux/ecosystem/atlassian/jira/9/9.4.11 && pwd && make build && make deploy cd `pwd`/linux/ecosystem/atlassian/jira/9/9.4.12 && pwd && make build && make deploy - cd `pwd`/linux/ecosystem/atlassian/jira/9/9.4.13 && pwd && make build && make deploy cd `pwd`/linux/ecosystem/atlassian/jira/9/9.4.14 && pwd && make build && make deploy cd `pwd`/linux/ecosystem/atlassian/jira/9/9.4.15 && pwd && make build && make deploy cd `pwd`/linux/ecosystem/atlassian/jira/9/9.4.16 && pwd && make build && make deploy diff --git a/linux/ecosystem/atlassian/confluence/9/9.2.0/Dockerfile b/linux/ecosystem/atlassian/confluence/9/9.2.0/Dockerfile new file mode 100644 index 000000000..b99e55d5d --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/9/9.2.0/Dockerfile @@ -0,0 +1,48 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG RELEASE=9.2.0 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${RELEASE}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_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 + +RUN updatedb + +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/confluence/9/9.2.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/confluence/9/9.2.0/Dockerfile.jdk11 new file mode 100644 index 000000000..2a47e1984 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/9/9.2.0/Dockerfile.jdk11 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG RELEASE=9.2.0 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${RELEASE}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_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 + +RUN updatedb + +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/confluence/9/9.2.0/Dockerfile.jdk17 b/linux/ecosystem/atlassian/confluence/9/9.2.0/Dockerfile.jdk17 new file mode 100644 index 000000000..f58fbbcbc --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/9/9.2.0/Dockerfile.jdk17 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG RELEASE=9.2.0 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${RELEASE}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_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 + +RUN updatedb + +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/confluence/9/9.2.0/Makefile b/linux/ecosystem/atlassian/confluence/9/9.2.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/9/9.2.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/confluence/9/9.2.0/docker-compose.yml b/linux/ecosystem/atlassian/confluence/9/9.2.0/docker-compose.yml new file mode 100644 index 000000000..b13d774f2 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/9/9.2.0/docker-compose.yml @@ -0,0 +1,16 @@ +#version: '3' +services: + app: + image: "epicmorg/confluence:9.2.0" + build: + context: . + app-jdk11: + image: "epicmorg/confluence:9.2.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/confluence:9.2.0-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/confluence/9/9.2.0/entrypoint.sh b/linux/ecosystem/atlassian/confluence/9/9.2.0/entrypoint.sh new file mode 100755 index 000000000..250fc031a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/9/9.2.0/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi