20 lines
460 B
Docker
20 lines
460 B
Docker
FROM alpine:latest
|
|
|
|
# Nginx package is available in the Alpine Linux repositories. To install it run:
|
|
RUN apk update && \
|
|
apk add nginx php-fpm81
|
|
|
|
# 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
|
|
|
|
COPY ../ /www
|
|
|
|
USER www
|
|
CMD ["nginx && php-fpm81 && sleep infinity"] |