willy.club/docker/Dockerfile

20 lines
460 B
Docker
Raw Normal View History

2022-12-29 01:53:33 +00:00
FROM alpine:latest
# Nginx package is available in the Alpine Linux repositories. To install it run:
RUN apk update && \
2022-12-29 02:31:21 +00:00
apk add nginx php81-fpm
2022-12-29 01:53:33 +00:00
# Creating new user and group 'www' for nginx
RUN adduser -D -g 'www' www
# Create a directory for html files
RUN mkdir /www && \
chown -R www:www /var/lib/nginx && \
chown -R www:www /www
COPY nginx.conf /etc/nginx/nginx.conf
2022-12-29 02:29:47 +00:00
COPY ../ /www
USER www
CMD ["nginx && php-fpm81 && sleep infinity"]