diff --git a/ats/sfs/Dockerfile b/ats/sfs/Dockerfile index 1df824ec..57cce85e 100644 --- a/ats/sfs/Dockerfile +++ b/ats/sfs/Dockerfile @@ -8,7 +8,7 @@ ARG ALFRESCO_SFS_GROUP_ID ARG ALFRESCO_SFS_USER_NAME ARG ALFRESCO_SFS_USER_ID -ADD ats/sfs/alfresco-shared-file-store-controller*.jar /opt/app.jar +ADD alfresco-shared-file-store-controller*.jar /opt/app.jar # Set default environment args ARG FILE_STORE_DIR=/tmp/Alfresco @@ -25,5 +25,5 @@ USER ${ALFRESCO_SFS_USER_NAME} HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=1m \ CMD curl -f http://localhost:8099/actuator/health || exit 1 -COPY ats/sfs/entrypoint.sh /entrypoint.sh +COPY entrypoint.sh /entrypoint.sh CMD ["/entrypoint.sh"] diff --git a/ats/trouter/Dockerfile b/ats/trouter/Dockerfile index 21759ace..93307412 100644 --- a/ats/trouter/Dockerfile +++ b/ats/trouter/Dockerfile @@ -8,7 +8,7 @@ ARG ALFRESCO_TROUTER_GROUP_ID ARG ALFRESCO_TROUTER_USER_NAME ARG ALFRESCO_TROUTER_USER_ID -ADD ats/trouter/alfresco-transform-router*.jar /opt/app.jar +ADD alfresco-transform-router*.jar /opt/app.jar RUN groupadd -g ${ALFRESCO_TROUTER_GROUP_ID} ${ALFRESCO_TROUTER_GROUP_NAME} && \ useradd -u ${ALFRESCO_TROUTER_USER_ID} -g ${ALFRESCO_TROUTER_GROUP_NAME} ${ALFRESCO_TROUTER_USER_NAME} && \ @@ -19,5 +19,5 @@ USER ${ALFRESCO_TROUTER_USER_NAME} HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=1m \ CMD curl -f http://localhost:8095/actuator/health || exit 1 -COPY ats/trouter/entrypoint.sh /entrypoint.sh +COPY entrypoint.sh /entrypoint.sh CMD ["/entrypoint.sh"] diff --git a/docker-bake.hcl b/docker-bake.hcl index 4bbe366c..dac61678 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -87,7 +87,8 @@ variable "ALFRESCO_REPO_USER_NAME" { } target "java_base" { - dockerfile = "./java/Dockerfile" + context = "./java" + dockerfile = "Dockerfile" args = { DISTRIB_NAME = "${DISTRIB_NAME}" DISTRIB_MAJOR = "${DISTRIB_MAJOR}" @@ -141,7 +142,8 @@ variable "TCNATIVE_SHA512" { } target "tomcat_base" { - dockerfile = "./tomcat/Dockerfile" + context = "./tomcat" + dockerfile = "Dockerfile" inherits = ["java_base"] contexts = { java_base = "target:java_base" @@ -208,7 +210,8 @@ target "search_liveindexing" { args = { LIVEINDEXING = "${liveindexing.artifact}" } - dockerfile = "./search/enterprise/common/Dockerfile" + context = "./search/enterprise/common" + dockerfile = "Dockerfile" inherits = ["java_base"] contexts = { java_base = "target:java_base" @@ -230,7 +233,8 @@ variable "ALFRESCO_TROUTER_USER_ID" { } target "ats_trouter" { - dockerfile = "./ats/trouter/Dockerfile" + context = "./ats/trouter" + dockerfile = "Dockerfile" inherits = ["java_base"] contexts = { java_base = "target:java_base" @@ -258,7 +262,8 @@ variable "ALFRESCO_SFS_USER_ID" { } target "ats_sfs" { - dockerfile = "./ats/sfs/Dockerfile" + context = "./ats/sfs" + dockerfile = "Dockerfile" inherits = ["java_base"] contexts = { java_base = "target:java_base" @@ -286,7 +291,8 @@ variable "ALFRESCO_IMAGEMAGICK_USER_ID" { } target "tengine_imagemagick" { - dockerfile = "./tengine/imagemagick/Dockerfile" + context = "./tengine/imagemagick" + dockerfile = "Dockerfile" inherits = ["java_base"] contexts = { java_base = "target:java_base" @@ -314,7 +320,8 @@ variable "ALFRESCO_LIBREOFFICE_USER_ID" { } target "tengine_libreoffice" { - dockerfile = "./tengine/libreoffice/Dockerfile" + context = "./tengine/libreoffice" + dockerfile = "Dockerfile" inherits = ["java_base"] contexts = { java_base = "target:java_base" @@ -342,7 +349,8 @@ variable "ALFRESCO_MISC_USER_ID" { } target "tengine_misc" { - dockerfile = "./tengine/misc/Dockerfile" + context = "./tengine/misc" + dockerfile = "Dockerfile" inherits = ["java_base"] contexts = { java_base = "target:java_base" @@ -370,7 +378,8 @@ variable "ALFRESCO_TIKA_USER_ID" { } target "tengine_tika" { - dockerfile = "./tengine/tika/Dockerfile" + context = "./tengine/tika" + dockerfile = "Dockerfile" inherits = ["java_base"] contexts = { java_base = "target:java_base" @@ -398,7 +407,8 @@ variable "ALFRESCO_PDFRENDERER_USER_ID" { } target "tengine_pdfrenderer" { - dockerfile = "./tengine/pdfrenderer/Dockerfile" + context = "./tengine/pdfrenderer" + dockerfile = "Dockerfile" inherits = ["java_base"] contexts = { java_base = "target:java_base" @@ -426,7 +436,8 @@ variable "ALFRESCO_AIO_USER_ID" { } target "tengine_aio" { - dockerfile = "./tengine/aio/Dockerfile" + context = "./tengine" + dockerfile = "aio/Dockerfile" inherits = ["java_base"] contexts = { java_base = "target:java_base" diff --git a/search/enterprise/common/Dockerfile b/search/enterprise/common/Dockerfile index d525d755..af9c5669 100644 --- a/search/enterprise/common/Dockerfile +++ b/search/enterprise/common/Dockerfile @@ -4,10 +4,10 @@ ARG LIVEINDEXING ENV PORT=8080 EXPOSE 8080 -ADD search/enterprise/common/${LIVEINDEXING}*-app.jar /opt/app.jar +ADD ${LIVEINDEXING}*-app.jar /opt/app.jar HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=1m \ CMD curl -f http://localhost:8080/actuator/health || exit 1 -COPY search/enterprise/common/entrypoint.sh /entrypoint.sh +COPY entrypoint.sh /entrypoint.sh CMD ["/entrypoint.sh"] diff --git a/tengine/aio/Dockerfile b/tengine/aio/Dockerfile index d040ad0c..b5e2e7f6 100644 --- a/tengine/aio/Dockerfile +++ b/tengine/aio/Dockerfile @@ -3,7 +3,6 @@ FROM java_base ENV JAVA_OPTS_CONTAINER_FLAGS=-XX:MaxRAMPercentage=80 ENV COMMON_PATH=tengine -ENV AIO_COMMON_PATH=tengine/aio ENV EPEL_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm EXPOSE 8090 @@ -13,7 +12,7 @@ ARG ALFRESCO_AIO_GROUP_ID ARG ALFRESCO_AIO_USER_NAME ARG ALFRESCO_AIO_USER_ID -RUN --mount=type=bind,source=${COMMON_PATH},target=/dist \ +RUN --mount=type=bind,source=/,target=/dist \ mkdir /tmp/dist && \ tar xzf /dist/libreoffice/*.gz -C /tmp/dist && \ yum localinstall -y /tmp/dist/LibreOffice*/RPMS/*.rpm && \ @@ -25,7 +24,7 @@ RUN --mount=type=bind,source=${COMMON_PATH},target=/dist \ rm -rf /tmp/dist && \ yum clean all -ADD ${AIO_COMMON_PATH}/alfresco-transform-core-aio*.jar /opt/app.jar +ADD aio/alfresco-transform-core-aio*.jar /opt/app.jar RUN groupadd -g ${ALFRESCO_AIO_GROUP_ID} ${ALFRESCO_AIO_GROUP_NAME} && \ useradd -u ${ALFRESCO_AIO_USER_ID} -g ${ALFRESCO_AIO_GROUP_NAME} ${ALFRESCO_AIO_USER_NAME} && \ @@ -36,5 +35,5 @@ USER ${ALFRESCO_AIO_USER_NAME} HEALTHCHECK --interval=20s --timeout=10s --retries=3 --start-period=30s \ CMD curl -f http://localhost:8090/live || exit 1 -COPY ${AIO_COMMON_PATH}/entrypoint.sh /entrypoint.sh +COPY aio/entrypoint.sh /entrypoint.sh CMD ["/entrypoint.sh"] diff --git a/tengine/imagemagick/Dockerfile b/tengine/imagemagick/Dockerfile index 9d9b3b22..8772bdd5 100644 --- a/tengine/imagemagick/Dockerfile +++ b/tengine/imagemagick/Dockerfile @@ -4,16 +4,15 @@ EXPOSE 8090 ENV JAVA_OPTS_CONTAINER_FLAGS=-XX:MaxRAMPercentage=80 ENV IMAGEMAGICK_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -ENV IMAGEMAGICK_COMMON_PATH=tengine/imagemagick ARG ALFRESCO_IMAGEMAGICK_GROUP_NAME ARG ALFRESCO_IMAGEMAGICK_GROUP_ID ARG ALFRESCO_IMAGEMAGICK_USER_NAME ARG ALFRESCO_IMAGEMAGICK_USER_ID -ADD ${IMAGEMAGICK_COMMON_PATH}/alfresco-transform-imagemagick*.jar /opt/app.jar -ADD ${IMAGEMAGICK_COMMON_PATH}/imagemagick-distribution*-el9.rpm /tmp/imagemagick-distribution-el9.rpm -ADD ${IMAGEMAGICK_COMMON_PATH}/libs/imagemagick-distribution*-libs-el9.rpm /tmp/imagemagick-distribution-libs-el9.rpm +ADD alfresco-transform-imagemagick*.jar /opt/app.jar +ADD imagemagick-distribution*-el9.rpm /tmp/imagemagick-distribution-el9.rpm +ADD libs/imagemagick-distribution*-libs-el9.rpm /tmp/imagemagick-distribution-libs-el9.rpm RUN yum install -y $IMAGEMAGICK_DEP_RPM_URL && \ yum install -y /tmp/imagemagick-distribution-el9.rpm /tmp/imagemagick-distribution-libs-el9.rpm; \ @@ -28,5 +27,5 @@ USER ${ALFRESCO_IMAGEMAGICK_USER_NAME} HEALTHCHECK --interval=20s --timeout=10s --retries=3 --start-period=30s \ CMD curl -f http://localhost:8090/live || exit 1 -COPY ${IMAGEMAGICK_COMMON_PATH}/entrypoint.sh /entrypoint.sh +COPY entrypoint.sh /entrypoint.sh CMD ["/entrypoint.sh"] diff --git a/tengine/libreoffice/Dockerfile b/tengine/libreoffice/Dockerfile index 1a262cca..2dced0ee 100644 --- a/tengine/libreoffice/Dockerfile +++ b/tengine/libreoffice/Dockerfile @@ -1,6 +1,5 @@ FROM java_base -ENV LIBREOFFICE_COMMON_PATH=tengine/libreoffice ENV JAVA_OPTS_CONTAINER_FLAGS=-XX:MaxRAMPercentage=80 EXPOSE 8090 @@ -10,7 +9,7 @@ ARG ALFRESCO_LIBREOFFICE_GROUP_ID ARG ALFRESCO_LIBREOFFICE_USER_NAME ARG ALFRESCO_LIBREOFFICE_USER_ID -RUN --mount=type=bind,source=${LIBREOFFICE_COMMON_PATH},target=/dist \ +RUN --mount=type=bind,source=/,target=/dist \ mkdir /tmp/dist && \ tar xzf /dist/*.gz -C /tmp/dist && \ yum localinstall -y /tmp/dist/LibreOffice*/RPMS/*.rpm && \ @@ -18,7 +17,7 @@ RUN --mount=type=bind,source=${LIBREOFFICE_COMMON_PATH},target=/dist \ rm -rf /tmp/dist && \ yum clean all -ADD ${LIBREOFFICE_COMMON_PATH}/alfresco-transform-libreoffice*.jar /opt/app.jar +ADD alfresco-transform-libreoffice*.jar /opt/app.jar RUN groupadd -g ${ALFRESCO_LIBREOFFICE_GROUP_ID} ${ALFRESCO_LIBREOFFICE_GROUP_NAME} && \ useradd -u ${ALFRESCO_LIBREOFFICE_USER_ID} -g ${ALFRESCO_LIBREOFFICE_GROUP_NAME} ${ALFRESCO_LIBREOFFICE_USER_NAME} && \ @@ -29,5 +28,5 @@ USER ${ALFRESCO_LIBREOFFICE_USER_NAME} HEALTHCHECK --interval=20s --timeout=10s --retries=3 --start-period=30s \ CMD curl -f http://localhost:8090/live || exit 1 -COPY ${LIBREOFFICE_COMMON_PATH}/entrypoint.sh /entrypoint.sh +COPY entrypoint.sh /entrypoint.sh CMD ["/entrypoint.sh"] diff --git a/tengine/misc/Dockerfile b/tengine/misc/Dockerfile index 13d3387d..a88acfaa 100644 --- a/tengine/misc/Dockerfile +++ b/tengine/misc/Dockerfile @@ -1,6 +1,5 @@ FROM java_base -ENV MISC_COMMON_PATH=tengine/misc ENV JAVA_OPTS_CONTAINER_FLAGS=-XX:MaxRAMPercentage=80 EXPOSE 8090 @@ -10,7 +9,7 @@ ARG ALFRESCO_MISC_GROUP_ID ARG ALFRESCO_MISC_USER_NAME ARG ALFRESCO_MISC_USER_ID -ADD ${MISC_COMMON_PATH}/alfresco-transform-misc*.jar /opt/app.jar +ADD alfresco-transform-misc*.jar /opt/app.jar RUN groupadd -g ${ALFRESCO_MISC_GROUP_ID} ${ALFRESCO_MISC_GROUP_NAME} && \ useradd -u ${ALFRESCO_MISC_USER_ID} -g ${ALFRESCO_MISC_GROUP_NAME} ${ALFRESCO_MISC_USER_NAME} && \ @@ -21,5 +20,5 @@ USER ${ALFRESCO_MISC_USER_NAME} HEALTHCHECK --interval=20s --timeout=10s --retries=3 --start-period=30s \ CMD curl -f http://localhost:8090/live || exit 1 -COPY ${MISC_COMMON_PATH}/entrypoint.sh /entrypoint.sh +COPY entrypoint.sh /entrypoint.sh CMD ["/entrypoint.sh"] diff --git a/tengine/pdfrenderer/Dockerfile b/tengine/pdfrenderer/Dockerfile index be522275..e8e8fa24 100644 --- a/tengine/pdfrenderer/Dockerfile +++ b/tengine/pdfrenderer/Dockerfile @@ -1,6 +1,5 @@ FROM java_base -ENV PDFRENDERER_COMMON_PATH=tengine/pdfrenderer ENV JAVA_OPTS_CONTAINER_FLAGS=-XX:MaxRAMPercentage=80 EXPOSE 8090 @@ -10,11 +9,11 @@ ARG ALFRESCO_PDFRENDERER_GROUP_ID ARG ALFRESCO_PDFRENDERER_USER_NAME ARG ALFRESCO_PDFRENDERER_USER_ID -RUN --mount=type=bind,source=${PDFRENDERER_COMMON_PATH},target=/dist \ +RUN --mount=type=bind,source=/,target=/dist \ tar xzf /dist/*.tgz -C /usr/bin && \ yum clean all -ADD ${PDFRENDERER_COMMON_PATH}/alfresco-transform-pdf-renderer*.jar /opt/app.jar +ADD alfresco-transform-pdf-renderer*.jar /opt/app.jar RUN groupadd -g ${ALFRESCO_PDFRENDERER_GROUP_ID} ${ALFRESCO_PDFRENDERER_GROUP_NAME} && \ useradd -u ${ALFRESCO_PDFRENDERER_USER_ID} -g ${ALFRESCO_PDFRENDERER_GROUP_NAME} ${ALFRESCO_PDFRENDERER_USER_NAME} && \ @@ -25,5 +24,5 @@ USER ${ALFRESCO_PDFRENDERER_USER_NAME} HEALTHCHECK --interval=20s --timeout=10s --retries=3 --start-period=30s \ CMD curl -f http://localhost:8090/live || exit 1 -COPY ${PDFRENDERER_COMMON_PATH}/entrypoint.sh /entrypoint.sh +COPY entrypoint.sh /entrypoint.sh CMD ["/entrypoint.sh"] diff --git a/tengine/tika/Dockerfile b/tengine/tika/Dockerfile index 84b96bdd..a4dda086 100644 --- a/tengine/tika/Dockerfile +++ b/tengine/tika/Dockerfile @@ -1,7 +1,6 @@ FROM java_base ENV JAVA_OPTS_CONTAINER_FLAGS=-XX:MaxRAMPercentage=80 -ENV TIKA_COMMON_PATH=tengine/tika ENV TIKA_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm EXPOSE 8090 @@ -15,7 +14,7 @@ RUN yum install -y ${TIKA_DEP_RPM_URL} && \ yum -y install perl-Image-ExifTool && \ yum clean all -ADD ${TIKA_COMMON_PATH}/alfresco-transform-tika*.jar /opt/app.jar +ADD alfresco-transform-tika*.jar /opt/app.jar RUN groupadd -g ${ALFRESCO_TIKA_GROUP_ID} ${ALFRESCO_TIKA_GROUP_NAME} && \ useradd -u ${ALFRESCO_TIKA_USER_ID} -g ${ALFRESCO_TIKA_GROUP_NAME} ${ALFRESCO_TIKA_USER_NAME} && \ @@ -26,5 +25,5 @@ USER ${ALFRESCO_TIKA_USER_NAME} HEALTHCHECK --interval=20s --timeout=10s --retries=3 --start-period=30s \ CMD curl -f http://localhost:8090/live || exit 1 -COPY ${TIKA_COMMON_PATH}/entrypoint.sh /entrypoint.sh +COPY entrypoint.sh /entrypoint.sh CMD ["/entrypoint.sh"]