Dockerfile 416 B

123456789101112131415161718
  1. FROM nginx:alpine
  2. MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
  3. ADD nginx.conf /etc/nginx/
  4. ARG PHP_UPSTREAM=php-fpm
  5. RUN apk update \
  6. && apk upgrade \
  7. && apk add --no-cache bash \
  8. && adduser -D -H -u 1000 -s /bin/bash www-data \
  9. && rm /etc/nginx/conf.d/default.conf \
  10. && echo "upstream php-upstream { server ${PHP_UPSTREAM}:9000; }" > /etc/nginx/conf.d/upstream.conf
  11. CMD ["nginx"]
  12. EXPOSE 80 443