11#This Docker file is for building the University of Edinburgh specific STACK API Demo server.
22#Please use the other Dockerfile in this folder.
33#Intermediate step installing dependencies
4- FROM composer:lts as composer
4+ FROM composer:lts AS composer
55
66COPY / /work/
77
@@ -43,18 +43,18 @@ COPY / /srv/stack
4343#Copy dependencies
4444COPY --from=composer /work/api/vendor /srv/stack/api/vendor
4545
46- FROM base as development
46+ FROM base AS development
4747
4848#Enable xdebug extension in develop
4949COPY /api/docker/files/xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
5050RUN pecl install xdebug && \
5151 docker-php-ext-enable xdebug
5252
53- FROM development as profiling
53+ FROM development AS profiling
5454
5555COPY /api/docker/files/xdebug-profile.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
5656
57- FROM base as production
57+ FROM base AS production
5858
5959#Enable opcache extension in production
6060COPY /api/docker/files/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
@@ -66,8 +66,11 @@ RUN docker-php-ext-install opcache && \
6666# Required for building the Edinburgh demo server
6767RUN a2enmod ssl && \
6868 apt-get update && \
69- apt install -y python3 python3-dev python3-venv libaugeas-dev gcc && \
69+ apt-get install -y python3 python3-dev python3-venv libaugeas-dev gcc && \
7070 python3 -m venv /opt/certbot/ && \
7171 /opt/certbot/bin/pip install --upgrade pip && \
7272 /opt/certbot/bin/pip install certbot certbot-apache && \
73- echo "0 0,12 * * * root /opt/certbot/bin/python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew -q" | tee -a /etc/crontab > /dev/null
73+ apt-get install -y cron
74+
75+ COPY /api/docker/files/startcron /usr/sbin
76+ ENTRYPOINT ["startcron"]
0 commit comments