From 37d0884806751c16ddaec92244e5ec905764958a Mon Sep 17 00:00:00 2001 From: STAM Date: Fri, 7 Feb 2025 18:41:44 +0300 Subject: [PATCH 1/5] make - autocommit --- Makefile | 7 +- .../debian/12-bookworm/develop/Dockerfile | 44 +++++++ .../debian/12-bookworm/python/3.13/Dockerfile | 116 ++++++++++++++++++ .../debian/12-bookworm/python/3.13/Makefile | 36 ++++++ .../python/3.13/docker-compose.yml | 6 + .../apt/preferences.d/block-python-packages | 3 + .../apt/preferences.d/block-python2-packages | 3 + .../apt/preferences.d/block-python3-packages | 3 + 8 files changed, 217 insertions(+), 1 deletion(-) create mode 100644 linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile create mode 100644 linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Makefile create mode 100644 linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/docker-compose.yml create mode 100644 linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/etc/apt/preferences.d/block-python-packages create mode 100644 linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/etc/apt/preferences.d/block-python2-packages create mode 100644 linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/etc/apt/preferences.d/block-python3-packages diff --git a/Makefile b/Makefile index c08caa6e3..409f06961 100644 --- a/Makefile +++ b/Makefile @@ -2408,4 +2408,9 @@ bundle-p4: @echo "=======================================" make ecosystem-perforce-base-images make ecosystem-perforce-proxy-images - \ No newline at end of file + +bundle-python: + @echo "==============================================" + @echo "===== Building EpicMorg Python images =====" + @echo "==============================================" + cd `pwd`/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13 && pwd && make build && make deploy \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/develop/Dockerfile b/linux/ecosystem/epicmorg/debian/12-bookworm/develop/Dockerfile index 07918833a..c53562d58 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/develop/Dockerfile +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/develop/Dockerfile @@ -230,6 +230,17 @@ ARG OPENSSL_33_DOWNLOAD_URL=https://www.openssl.org/source/openssl-${OPENSSL_33_ ARG OPENSSL_33_TEMP=/tmp/openssl-${OPENSSL_33_VERSION}.tar.gz ARG OPENSSL_33_TEMP_SRC=/tmp/openssl-${OPENSSL_33_VERSION} +# OpenSSL 3.4.0 +ENV OPENSSL_34_VERSION=3.4.0 +ENV OPENSSL_34_DIR=${EMG_LOCAL_BASE_DIR}/openssl/${OPENSSL_34_VERSION} +ENV OPENSSL_34_BIN_DIR=${OPENSSL_34_DIR}/bin +ENV OPENSSL_34_INC_DIR=${OPENSSL_34_DIR}/include +ENV OPENSSL_34_LIB_DIR=${OPENSSL_34_DIR}/lib64 +ENV OPENSSL_34_SRC_DIR=/usr/local/src/openssl/${OPENSSL_34_VERSION} +ARG OPENSSL_34_DOWNLOAD_URL=https://www.openssl.org/source/openssl-${OPENSSL_34_VERSION}.tar.gz +ARG OPENSSL_34_TEMP=/tmp/openssl-${OPENSSL_34_VERSION}.tar.gz +ARG OPENSSL_34_TEMP_SRC=/tmp/openssl-${OPENSSL_34_VERSION} + # LibreSSL ENV LIBRESSL_VERSION=4.0.0 ENV LIBRESSL_DIR=${EMG_LOCAL_BASE_DIR}/libressl/${LIBRESSL_VERSION} @@ -998,6 +1009,39 @@ RUN tar -xzf ${OPENSSL_33_TEMP} --directory /tmp && \ echo ${OPENSSL_33_LIB_DIR} >> ${LD_CONF_DIR}/OpenSSL.conf && \ ldconfig +################################################################## +# OpenSSL 3.4.0 +################################################################## +RUN mkdir -p ${OPENSSL_34_DIR} ${OPENSSL_34_SRC_DIR} +ADD ${OPENSSL_34_DOWNLOAD_URL} /tmp + +RUN tar -xzf ${OPENSSL_34_TEMP} --directory /tmp && \ + cp -rfv ${OPENSSL_34_TEMP_SRC}/* ${OPENSSL_34_SRC_DIR} && \ + ln -sf ${OPENSSL_34_SRC_DIR} ${OPENSSL_34_DIR}/src && \ + cd ${OPENSSL_34_TEMP_SRC} && \ + ./config \ + zlib \ + --with-zlib-include=${ZLIB_DIR}/include \ + --with-zlib-lib=${ZLIB_DIR}/lib \ + --with-zstd-include=${ZSTD_DIR}/include \ + --with-zstd-lib=${ZSTD_DIR}/lib \ + enable-ktls \ + enable-ec_nistp_64_gcc_128 \ + enable-egd \ + enable-fips \ + enable-ssl-trace\ + enable-trace \ + threads \ + sctp \ + --release \ + --prefix=${OPENSSL_34_DIR} \ + && \ + make -j$(nproc) && \ + make -j$(nproc) install && \ + echo "# OpenSSL support" >> ${LD_CONF_DIR}/OpenSSL.conf && \ + echo ${OPENSSL_34_LIB_DIR} >> ${LD_CONF_DIR}/OpenSSL.conf && \ + ldconfig + ################################################################## # LibreSSL ################################################################## diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile new file mode 100644 index 000000000..b6c5ff49a --- /dev/null +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile @@ -0,0 +1,116 @@ +FROM epicmorg/debian:bookworm-develop as builder + +# /etc/ld.so.conf.d/ +ARG LD_CONF_DIR=/etc/ld.so.conf.d/ + +# python 3.13 +ENV PYTHON_VERSION=3.13.2 +ENV PYTHON_DIR=${EMG_LOCAL_BASE_DIR}/python/${PYTHON_VERSION} +ARG PYTHON_BIN_DIR=${PYTHON_DIR}/bin +ARG PYTHON_SRC_DIR=${PYTHON_DIR}/src +ARG PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz +ARG PYTHON_TEMP=/tmp/Python-${PYTHON_VERSION}.tgz + +RUN apt update && apt install -y \ + build-essential \ + libssl-dev \ + zlib1g-dev \ + libncurses5-dev \ + libncursesw5-dev \ + libreadline-dev \ + libsqlite3-dev \ + libgdbm-dev \ + libdb5.3-dev \ + libbz2-dev \ + libexpat1-dev \ + liblzma-dev \ + libffi-dev \ + uuid-dev \ + tk-dev + +################################################################## +# CMake +################################################################## +RUN mkdir -p ${PYTHON_DIR} ${PYTHON_SRC_DIR} +ADD ${PYTHON_DOWNLOAD_URL} /tmp + +RUN tar -xvzf ${PYTHON_TEMP} --strip-components=1 --directory ${PYTHON_SRC_DIR} + +ENV OPENSSL_ROOT=${OPENSSL_34_DIR} +ENV LD_LIBRARY_PATH=${OPENSSL_ROOT}/lib64:$LD_LIBRARY_PATH + +RUN cd ${PYTHON_SRC_DIR} && \ + ./configure \ + --prefix=${PYTHON_DIR} \ + --enable-optimizations \ + --enable-option-checking=fatal \ + --with-lto \ + --enable-loadable-sqlite-extensions \ + --with-ensurepip=install \ + --enable-profiling \ + --with-system-expat \ + --enable-option-checking=fatal \ + --with-computed-gotos \ + --with-pydebug \ + --with-trace-refs \ + --with-assertions \ + --with-valgrind \ + --with-static-libpython \ + --with-openssl-rpath=auto \ + --with-openssl=${OPENSSL_34_DIR} \ + LDFLAGS="-Wl,-rpath,${OPENSSL_34_DIR}/lib64" \ + CPPFLAGS="-I${OPENSSL_34_DIR}/include" + +RUN make -j$(nproc) && \ + make altinstall + +################################################################## +################################################################## +################################################################## +# Final Layer +################################################################## +################################################################## +################################################################## +FROM epicmorg/debian:bookworm + +################################################################## +# Python 3.13 +################################################################## +ENV PYTHON_VERSION=3.13.2 +ENV PYTHON_DIR=${EMG_LOCAL_BASE_DIR}/python/${PYTHON_VERSION} +ARG PYTHON_BIN_DIR=${PYTHON_DIR}/bin +ARG PYTHON_SRC_DIR=${PYTHON_DIR}/src + +RUN apt-get remove -y python3-pip + +COPY etc/apt/preferences.d /etc/apt/preferences.d +COPY --from=builder ${OPENSSL_34_DIR}/ ${OPENSSL_34_DIR}/ + +RUN mv ${PYTHON_SRC_DIR} /usr/local/src/${PYTHON_VERSION} && \ + ln -sfv /usr/local/src/${PYTHON_VERSION} ${PYTHON_SRC_DIR} \ + update-alternatives --install /usr/bin/pip3 pip3 ${PYTHON_DIR}/bin/pip3.13 1 && \ + update-alternatives --install /usr/bin/pip pip ${PYTHON_DIR}/bin/pip3.13 1 && \ + update-alternatives --install /usr/bin/python python ${PYTHON_DIR}/bin/python3.13 1 && \ + update-alternatives --install /usr/bin/python3 python3 ${PYTHON_DIR}/bin/python3.13 1 + +ENV PATH="${PYTHON_BIN_DIR}:${PATH}" +RUN echo "=============================================" && \ + echo python3.13 --version && \ + echo python3 --version && \ + echo python --version && \ + echo pip3 --version && \ + echo pip --version && \ + echo "=============================================" + +################################################################## +# cleanup +################################################################## +RUN echo "clean up" && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /root/tmp/* && \ + rm -rfv /tmp/* + +RUN updatedb diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Makefile b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/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/epicmorg/debian/12-bookworm/python/3.13/docker-compose.yml b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/docker-compose.yml new file mode 100644 index 000000000..75fa8bf01 --- /dev/null +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/docker-compose.yml @@ -0,0 +1,6 @@ +#version: '3' +services: + app: + image: "epicmorg/debian:bookworm-python-3.13" + build: + context: . diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/etc/apt/preferences.d/block-python-packages b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/etc/apt/preferences.d/block-python-packages new file mode 100644 index 000000000..2b2824a84 --- /dev/null +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/etc/apt/preferences.d/block-python-packages @@ -0,0 +1,3 @@ +Package: python-* +Pin: release * +Pin-Priority: -1 diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/etc/apt/preferences.d/block-python2-packages b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/etc/apt/preferences.d/block-python2-packages new file mode 100644 index 000000000..6cb9a2e9d --- /dev/null +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/etc/apt/preferences.d/block-python2-packages @@ -0,0 +1,3 @@ +Package: python2-* +Pin: release * +Pin-Priority: -1 diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/etc/apt/preferences.d/block-python3-packages b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/etc/apt/preferences.d/block-python3-packages new file mode 100644 index 000000000..eccd7ebc6 --- /dev/null +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/etc/apt/preferences.d/block-python3-packages @@ -0,0 +1,3 @@ +Package: python3-* +Pin: release * +Pin-Priority: -1 From 8fd3ba22dc8c6b0c148c02c135250c4ce9e591a6 Mon Sep 17 00:00:00 2001 From: STAM Date: Fri, 7 Feb 2025 18:46:44 +0300 Subject: [PATCH 2/5] make - autocommit --- .../epicmorg/debian/12-bookworm/python/3.13/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile index b6c5ff49a..5a7f35ac4 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile @@ -39,8 +39,9 @@ RUN tar -xvzf ${PYTHON_TEMP} --strip-components=1 --directory ${PYTHON_SRC_DIR} ENV OPENSSL_ROOT=${OPENSSL_34_DIR} ENV LD_LIBRARY_PATH=${OPENSSL_ROOT}/lib64:$LD_LIBRARY_PATH -RUN cd ${PYTHON_SRC_DIR} && \ - ./configure \ +WORKDIR ${PYTHON_SRC_DIR} + +RUN ./configure \ --prefix=${PYTHON_DIR} \ --enable-optimizations \ --enable-option-checking=fatal \ From 04a7f2059c058dc1e8cb9aee8e14181de01edce5 Mon Sep 17 00:00:00 2001 From: STAM Date: Sat, 8 Feb 2025 15:22:11 +0300 Subject: [PATCH 3/5] make - autocommit --- .../epicmorg/debian/12-bookworm/python/3.13/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile index 5a7f35ac4..ee68fa8dc 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile @@ -87,14 +87,19 @@ RUN apt-get remove -y python3-pip COPY etc/apt/preferences.d /etc/apt/preferences.d COPY --from=builder ${OPENSSL_34_DIR}/ ${OPENSSL_34_DIR}/ +ENV PATH="${PYTHON_BIN_DIR}:${PATH}" + RUN mv ${PYTHON_SRC_DIR} /usr/local/src/${PYTHON_VERSION} && \ ln -sfv /usr/local/src/${PYTHON_VERSION} ${PYTHON_SRC_DIR} \ + rm -rfv /usr/bin/pip3 && \ + rm -rfv /usr/bin/pip && \ + rm -rfv /usr/bin/python && \ + rm -rfv /usr/bin/python3 && \ update-alternatives --install /usr/bin/pip3 pip3 ${PYTHON_DIR}/bin/pip3.13 1 && \ update-alternatives --install /usr/bin/pip pip ${PYTHON_DIR}/bin/pip3.13 1 && \ update-alternatives --install /usr/bin/python python ${PYTHON_DIR}/bin/python3.13 1 && \ update-alternatives --install /usr/bin/python3 python3 ${PYTHON_DIR}/bin/python3.13 1 -ENV PATH="${PYTHON_BIN_DIR}:${PATH}" RUN echo "=============================================" && \ echo python3.13 --version && \ echo python3 --version && \ From 37e9e38dc806634a343d560f38dd24ce45a43756 Mon Sep 17 00:00:00 2001 From: STAM Date: Sat, 8 Feb 2025 15:23:37 +0300 Subject: [PATCH 4/5] 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 From ed63cb27c767c987427ab1e92618235f1512d43a Mon Sep 17 00:00:00 2001 From: STAM Date: Sat, 8 Feb 2025 16:05:48 +0300 Subject: [PATCH 5/5] make - autocommit --- .../debian/12-bookworm/python/3.13/Dockerfile | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile index ee68fa8dc..8d5765caf 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/python/3.13/Dockerfile @@ -1,16 +1,5 @@ FROM epicmorg/debian:bookworm-develop as builder -# /etc/ld.so.conf.d/ -ARG LD_CONF_DIR=/etc/ld.so.conf.d/ - -# python 3.13 -ENV PYTHON_VERSION=3.13.2 -ENV PYTHON_DIR=${EMG_LOCAL_BASE_DIR}/python/${PYTHON_VERSION} -ARG PYTHON_BIN_DIR=${PYTHON_DIR}/bin -ARG PYTHON_SRC_DIR=${PYTHON_DIR}/src -ARG PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz -ARG PYTHON_TEMP=/tmp/Python-${PYTHON_VERSION}.tgz - RUN apt update && apt install -y \ build-essential \ libssl-dev \ @@ -28,10 +17,21 @@ RUN apt update && apt install -y \ uuid-dev \ tk-dev +# /etc/ld.so.conf.d/ +ARG LD_CONF_DIR=/etc/ld.so.conf.d/ + +# python 3.13 +ENV PYTHON_VERSION=3.13.2 +ENV PYTHON_DIR=${EMG_LOCAL_BASE_DIR}/python/${PYTHON_VERSION} +ARG PYTHON_BIN_DIR=${PYTHON_DIR}/bin +ARG PYTHON_SRC_DIR=${PYTHON_DIR}/src +ARG PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz +ARG PYTHON_TEMP=/tmp/Python-${PYTHON_VERSION}.tgz + ################################################################## # CMake ################################################################## -RUN mkdir -p ${PYTHON_DIR} ${PYTHON_SRC_DIR} +RUN mkdir -p ${PYTHON_DIR} ${PYTHON_SRC_DIR} ${PYTHON_BIN_DIR} ADD ${PYTHON_DOWNLOAD_URL} /tmp RUN tar -xvzf ${PYTHON_TEMP} --strip-components=1 --directory ${PYTHON_SRC_DIR} @@ -39,6 +39,8 @@ RUN tar -xvzf ${PYTHON_TEMP} --strip-components=1 --directory ${PYTHON_SRC_DIR} ENV OPENSSL_ROOT=${OPENSSL_34_DIR} ENV LD_LIBRARY_PATH=${OPENSSL_ROOT}/lib64:$LD_LIBRARY_PATH +ENV PATH="${PYTHON_BIN_DIR}:${PATH}" + WORKDIR ${PYTHON_SRC_DIR} RUN ./configure \ @@ -73,7 +75,12 @@ RUN make -j$(nproc) && \ ################################################################## ################################################################## FROM epicmorg/debian:bookworm - + +RUN apt-get remove -y python3-pip + +COPY etc/apt/preferences.d /etc/apt/preferences.d +COPY --from=builder ${PYTHON_DIR}/ ${PYTHON_DIR}/ + ################################################################## # Python 3.13 ################################################################## @@ -82,11 +89,6 @@ ENV PYTHON_DIR=${EMG_LOCAL_BASE_DIR}/python/${PYTHON_VERSION} ARG PYTHON_BIN_DIR=${PYTHON_DIR}/bin ARG PYTHON_SRC_DIR=${PYTHON_DIR}/src -RUN apt-get remove -y python3-pip - -COPY etc/apt/preferences.d /etc/apt/preferences.d -COPY --from=builder ${OPENSSL_34_DIR}/ ${OPENSSL_34_DIR}/ - ENV PATH="${PYTHON_BIN_DIR}:${PATH}" RUN mv ${PYTHON_SRC_DIR} /usr/local/src/${PYTHON_VERSION} && \