nginx-app/Dockerfile

31 lines
898 B
Docker

FROM cloudron/base:1.0.0
MAINTAINER Dennis Schwerdel <schwerdel@googlemail.com>
RUN mkdir -p /app/code
WORKDIR /app/code
RUN wget http://nginx.org/keys/nginx_signing.key && \
apt-key add nginx_signing.key && \
rm nginx_signing.key && \
echo "deb http://nginx.org/packages/mainline/ubuntu/ $(lsb_release -cs) nginx" > /etc/apt/sources.list.d/nginx.list && \
apt update && \
apt install -y nginx
ADD nginx.conf /app/code/nginx.conf.default
ADD public /app/code/public.default
ADD fpm.conf /etc/php/7.2/fpm/php-fpm.conf
ADD start.sh /app/code/start.sh
RUN mkdir /run/nginx && \
rm /var/log/nginx/*.log && \
ln -s /dev/stderr /var/log/nginx/error.log && \
ln -s /dev/stdout /var/log/nginx/access.log && \
rmdir /var/cache/nginx && ln -s /tmp /var/cache/nginx
RUN chown -R cloudron:cloudron /app/code /run/nginx
WORKDIR /app/data
CMD [ "/app/code/start.sh" ]