chown -R nginx:nginx /usr/share/nginx WORKDIR /usr/share/nginx USER nginx RUN composer install --no-dev --no-scripts --no-autoloader && \ composer dump-autoload --optimize USER root • version: '3.9' services: web: build: . container_name: myapp ports: - '7777:80' volumes: - ./src:/usr/share/nginx/src - ./public:/usr/share/nginx/ html/ depends_on: - db networks: - myapp-net