From 123fdc5baf36a884874ce36af54db14954904c7d Mon Sep 17 00:00:00 2001 From: Dedy Martadinata Date: Sat, 8 Oct 2022 00:22:20 +0700 Subject: [PATCH] docker: use the locally-downloaded assets Change the index to the local one to use the locally-downloaded fonts and css. --- .github/workflows/Dockerfile.ci.alpine | 2 ++ .github/workflows/Dockerfile.ci.debian | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Dockerfile.ci.alpine b/.github/workflows/Dockerfile.ci.alpine index d4cbde7..16022d9 100644 --- a/.github/workflows/Dockerfile.ci.alpine +++ b/.github/workflows/Dockerfile.ci.alpine @@ -39,6 +39,7 @@ RUN if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then \ # Web and App dir COPY docker-entrypoint.sh /docker-entrypoint.sh COPY lldap_config.docker_template.toml /lldap/ +COPY web/index_local.html web/index.html RUN cp target/lldap /lldap/ && \ cp target/migration-tool /lldap/ && \ cp -R web/index.html \ @@ -46,6 +47,7 @@ RUN cp target/lldap /lldap/ && \ web/static \ /lldap/app/ +WORKDIR /lldap RUN set -x \ && for file in $(cat /lldap/app/static/libraries.txt); do wget -P app/static "$file"; done \ && for file in $(cat /lldap/app/static/fonts/fonts.txt); do wget -P app/static/fonts "$file"; done \ diff --git a/.github/workflows/Dockerfile.ci.debian b/.github/workflows/Dockerfile.ci.debian index 47899fa..4beb101 100644 --- a/.github/workflows/Dockerfile.ci.debian +++ b/.github/workflows/Dockerfile.ci.debian @@ -39,6 +39,7 @@ RUN if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then \ # Web and App dir COPY docker-entrypoint.sh /docker-entrypoint.sh COPY lldap_config.docker_template.toml /lldap/ +COPY web/index_local.html web/index.html RUN cp target/lldap /lldap/ && \ cp target/migration-tool /lldap/ && \ cp -R web/index.html \ @@ -46,11 +47,12 @@ RUN cp target/lldap /lldap/ && \ web/static \ /lldap/app/ +WORKDIR /lldap RUN set -x \ && for file in $(cat /lldap/app/static/libraries.txt); do wget -P app/static "$file"; done \ && for file in $(cat /lldap/app/static/fonts/fonts.txt); do wget -P app/static/fonts "$file"; done \ - && chmod a+r -R . - + && chmod a+r -R . + FROM debian:bullseye-slim ENV UID=1000 ENV GID=1000