From 0fe76ccccc4a11a2fe8a97f8c5d94380344e8c55 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Wed, 17 Jul 2024 22:14:21 -0600 Subject: [PATCH] put the Dockerfile on a weight loss program --- Dockerfile | 28 ++++------------------ dockerbuild/ssp-overrides/announcement.php | 13 ---------- dockerbuild/ssp-overrides/id.php | 3 --- dockerbuild/ssp-overrides/index.php | 5 ---- 4 files changed, 5 insertions(+), 44 deletions(-) delete mode 100644 dockerbuild/ssp-overrides/announcement.php delete mode 100644 dockerbuild/ssp-overrides/id.php delete mode 100644 dockerbuild/ssp-overrides/index.php diff --git a/Dockerfile b/Dockerfile index 9a51e21e..ec20661b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,13 @@ FROM silintl/php8:8.1 -LABEL maintainer="Steve Bagwell " - -ENV REFRESHED_AT 2021-06-14 +LABEL maintainer="gtis_itse@groups.sil.org" RUN apt-get update -y \ - && apt-get install -y \ - php-gmp \ + && apt-get install -y php-gmp \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# Create required directories -RUN mkdir -p /data +WORKDIR /data COPY dockerbuild/vhost.conf /etc/apache2/sites-enabled/ COPY dockerbuild/run.sh /data/run.sh @@ -22,16 +18,11 @@ COPY dockerbuild/apply-dictionaries-overrides.php /data/ # Note the name change: repos extending this one should only run the metadata # tests, so those are the only tests we make available to them. COPY dockerbuild/run-metadata-tests.sh /data/run-tests.sh +COPY tests/MetadataTest.php /data/tests/MetadataTest.php # ErrorLog inside a VirtualHost block is ineffective for unknown reasons RUN sed -i -E 's@ErrorLog .*@ErrorLog /proc/1/fd/2@i' /etc/apache2/apache2.conf -# get s3-expand -RUN curl https://raw.githubusercontent.com/silinternational/s3-expand/1.5/s3-expand -fo /usr/local/bin/s3-expand \ - && chmod a+x /usr/local/bin/s3-expand - -WORKDIR /data - # Install/cleanup composer dependencies ARG COMPOSER_FLAGS="--prefer-dist --no-interaction --no-dev --optimize-autoloader --no-scripts --no-progress" COPY composer.json /data/ @@ -39,7 +30,7 @@ COPY composer.lock /data/ RUN composer self-update --no-interaction RUN COMPOSER_ALLOW_SUPERUSER=1 composer install $COMPOSER_FLAGS -ENV SSP_PATH /data/vendor/simplesamlphp/simplesamlphp +ENV SSP_PATH=/data/vendor/simplesamlphp/simplesamlphp # Copy modules into simplesamlphp COPY modules/ $SSP_PATH/modules @@ -52,20 +43,12 @@ COPY modules/material/themes/material/profilereview/* $SSP_PATH/modules/profiler COPY modules/material/themes/material/silauth/* $SSP_PATH/modules/silauth/templates/ # Copy in SSP override files -RUN mv $SSP_PATH/public/index.php $SSP_PATH/public/ssp-index.php -COPY dockerbuild/ssp-overrides/index.php $SSP_PATH/public/index.php COPY dockerbuild/ssp-overrides/saml20-idp-remote.php $SSP_PATH/metadata/saml20-idp-remote.php COPY dockerbuild/ssp-overrides/saml20-sp-remote.php $SSP_PATH/metadata/saml20-sp-remote.php COPY dockerbuild/config/* $SSP_PATH/config/ -COPY dockerbuild/ssp-overrides/id.php $SSP_PATH/public/id.php -COPY dockerbuild/ssp-overrides/announcement.php $SSP_PATH/announcement/announcement.php COPY dockerbuild/ssp-overrides/sp-php.patch sp-php.patch RUN patch /data/vendor/simplesamlphp/simplesamlphp/modules/saml/src/Auth/Source/SP.php sp-php.patch -COPY tests /data/tests - -RUN chmod a+x /data/run.sh /data/run-tests.sh - ADD https://github.com/silinternational/config-shim/releases/latest/download/config-shim.gz config-shim.gz RUN gzip -d config-shim.gz && chmod 755 config-shim && mv config-shim /usr/local/bin @@ -74,5 +57,4 @@ RUN mkdir /data/cache RUN chown -R www-data:www-data /data/cache EXPOSE 80 -ENTRYPOINT ["/usr/local/bin/s3-expand"] CMD ["/data/run.sh"] diff --git a/dockerbuild/ssp-overrides/announcement.php b/dockerbuild/ssp-overrides/announcement.php deleted file mode 100644 index 26bd18af..00000000 --- a/dockerbuild/ssp-overrides/announcement.php +++ /dev/null @@ -1,13 +0,0 @@ - "2017-12-20 01:02:03", // "Y-m-d H:i:s", - * 'end_datetime' => "2017-12-24 01:02:03", // "Y-m-d H:i:s", - * 'announcement_text' => '

Notice:

Christmas is almost here!
', - * ]; - */ - -return null; diff --git a/dockerbuild/ssp-overrides/id.php b/dockerbuild/ssp-overrides/id.php deleted file mode 100644 index 5bba913e..00000000 --- a/dockerbuild/ssp-overrides/id.php +++ /dev/null @@ -1,3 +0,0 @@ -