Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c7661c3 authored by Felix Ableitner's avatar Felix Ableitner
Browse files

Use fpm-alpine as base image, run as non-root (fixes #10)

parent 53d3a42a
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
FROM php:7-apache-stretch
FROM php:7-fpm-alpine
ARG DOMAIN=welcome.ecloud.global
LABEL maintainer "thilo@e.email"
COPY htdocs /var/www/html/
@@ -10,11 +10,12 @@ RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# copy composer executable from official Docker image
# https://hub.docker.com/_/composer
COPY --from=composer:1.8 /usr/bin/composer /usr/bin/composer
RUN apt-get update && apt-get install -y --no-install-recommends git unzip \
RUN apk --no-cache add --virtual composer-deps git unzip \
 # these params are recommended for installing untrusted extensions
 # https://getcomposer.org/doc/faqs/how-to-install-untrusted-packages-safely.md
 && composer require --no-plugins --no-scripts pear/mail pear/net_smtp pear/auth_sasl pear/mail_mime \
 && apt-get remove -y git unzip \
 && rm -rf /var/lib/apt/lists/* \
 && apk del composer-deps \
 # composer shouldnt be present in production setups
 && rm /usr/bin/composer

USER www-data