Skip to content

Commit

Permalink
put the Dockerfile on a weight loss program
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Jul 18, 2024
1 parent d84aaab commit 0fe76cc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 44 deletions.
28 changes: 5 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
FROM silintl/php8:8.1

LABEL maintainer="Steve Bagwell <[email protected]>"

ENV REFRESHED_AT 2021-06-14
LABEL maintainer="[email protected]"

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
Expand All @@ -22,24 +18,19 @@ 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/
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
Expand All @@ -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

Expand All @@ -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"]
13 changes: 0 additions & 13 deletions dockerbuild/ssp-overrides/announcement.php

This file was deleted.

3 changes: 0 additions & 3 deletions dockerbuild/ssp-overrides/id.php

This file was deleted.

5 changes: 0 additions & 5 deletions dockerbuild/ssp-overrides/index.php

This file was deleted.

0 comments on commit 0fe76cc

Please sign in to comment.