Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
22 lines (16 sloc)
525 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php-server:7.4-alpine | |
# Edit here to use a different location | |
ENV WWW_ROOT /var/www | |
ENV APP_ROOT ${WWW_ROOT}/app | |
ENV NGINX_DOC_ROOT ${APP_ROOT}/public | |
# Uncomment and edit if using different paths | |
# RUN mkdir -p ${NGINX_DOC_ROOT} | |
COPY ./app ${APP_ROOT} | |
# Adjust permissions for new files and subdirs | |
RUN chown -R www-data:www-data ${APP_ROOT} | |
# Use unprivileged user to install dependencies | |
WORKDIR ${APP_ROOT} | |
USER www-data | |
RUN composer install --no-interaction | |
# Back to root user for starting daemons | |
USER root |