blob: c5b74ae3ed2aa3ec2dd4aecc4361affbf534ab62 [file] [log] [blame]
FROM php:7.1-alpine
RUN \
apk update && apk upgrade && \
# install dependencies
apk add \
postgresql-dev \
icu \
icu-libs \
icu-dev \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
libxml2-dev \
&& \
# install useful PHP extensions
docker-php-ext-install \
opcache \
mysqli \
pdo_mysql \
pdo_pgsql \
intl \
bcmath \
zip \
gd \
soap \
&& \
# install Composer
cd /tmp && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
# create src directory to store action files
RUN mkdir -p /action/src
# install Composer dependencies
COPY composer.json /action
RUN cd /action && /usr/bin/composer install --no-plugins --no-scripts --prefer-dist --no-dev -o && rm composer.lock
# copy required files
COPY router.php /action
COPY runner.php /action
# Run webserver on port 8080
EXPOSE 8080
CMD [ "php", "-S", "0.0.0.0:8080", "-d", "expose_php=0", "-d", "html_errors=0", "-d", "error_reporting=E_ALL", "/action/router.php" ]