Skip to content

Commit

Permalink
remove paths
Browse files Browse the repository at this point in the history
  • Loading branch information
pmacius committed Aug 6, 2024
1 parent 48c522e commit 9386d0f
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 31 deletions.
2 changes: 1 addition & 1 deletion ats/sfs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ats/trouter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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} && \
Expand All @@ -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"]
4 changes: 2 additions & 2 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ variable "ALFRESCO_AIO_USER_ID" {
}

target "tengine_aio" {
context = "./tengine/aio"
dockerfile = "Dockerfile"
context = "./tengine"
dockerfile = "aio/Dockerfile"
inherits = ["java_base"]
contexts = {
java_base = "target:java_base"
Expand Down
4 changes: 2 additions & 2 deletions search/enterprise/common/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
7 changes: 3 additions & 4 deletions tengine/aio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 && \
Expand All @@ -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} && \
Expand All @@ -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"]
9 changes: 4 additions & 5 deletions tengine/imagemagick/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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-8.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; \
Expand All @@ -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"]
9 changes: 4 additions & 5 deletions tengine/libreoffice/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM java_base

ENV LIBREOFFICE_COMMON_PATH=tengine/libreoffice
ENV JAVA_OPTS_CONTAINER_FLAGS=-XX:MaxRAMPercentage=80

EXPOSE 8090
Expand All @@ -10,24 +9,24 @@ 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 && \
yum install -y cairo cups-libs libSM libGLU && \
rm -rf /tmp/dist && \
yum clean all

ADD ${LIBREOFFICE_COMMON_PATH}/alfresco-transform-libreoffice*.jar /opt/app.jar
ADD alfresco-transform-libreoffice*.jar /usr/bin/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} && \
chgrp ${ALFRESCO_LIBREOFFICE_GROUP_NAME} /opt/app.jar
chgrp ${ALFRESCO_LIBREOFFICE_GROUP_NAME} /usr/bin/app.jar

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"]
5 changes: 2 additions & 3 deletions tengine/misc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM java_base

ENV MISC_COMMON_PATH=tengine/misc
ENV JAVA_OPTS_CONTAINER_FLAGS=-XX:MaxRAMPercentage=80

EXPOSE 8090
Expand All @@ -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} && \
Expand All @@ -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"]
7 changes: 3 additions & 4 deletions tengine/pdfrenderer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM java_base

ENV PDFRENDERER_COMMON_PATH=tengine/pdfrenderer
ENV JAVA_OPTS_CONTAINER_FLAGS=-XX:MaxRAMPercentage=80

EXPOSE 8090
Expand All @@ -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} && \
Expand All @@ -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"]
5 changes: 2 additions & 3 deletions tengine/tika/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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} && \
Expand All @@ -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"]

0 comments on commit 9386d0f

Please sign in to comment.