FROM unit:1.31.1-php8.2 # Alternatively, you can download the base image from AWS ECR: # FROM public.ecr.aws/nginx/unit:1.31.1-php8.2 # port used by the listener in config.json EXPOSE 8080 # application setup RUN mkdir /www/ \ && echo '' > /www/index.php \ # prepare the app config for Unit && echo '{ \ "listeners": { \ "*:8080": { \ "pass": "applications/php_app" \ } \ }, \ "applications": { \ "php_app": { \ "type": "php", \ "root": "/www/" \ } \ } \ }' > /docker-entrypoint.d/config.json