FROM alpine:3.18.2 # Install dependencies RUN apk update && \ apk upgrade && \ apk add --no-cache nginx php81 php81-fpm && \ rm -rf /var/cache/apk/* # Install Imagick RUN set -ex \ && apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS imagemagick-dev libtool \ && export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \ && pecl install imagick-3.4.3 \ && docker-php-ext-enable imagick \ && apk add --no-cache --virtual .imagick-runtime-deps imagemagick \ && apk del .phpize-deps # Set up nginx COPY ./docker/nginx.conf /etc/nginx/nginx.conf # Setup scripts COPY ./upload.php /tmp/upload.php COPY ./docker/start.sh /start.sh # Start server CMD ["sh", "/start.sh"]