I am currently trying to deploy a basic Hello World PHP application on Fargate. I have created the following Dockerfile:
FROM php:8.0-apache
ENV SRC_DIR /var/www/html
RUN mkdir -p $SRC_DIR
COPY hello.php $SRC_DIR
EXPOSE 80
The image then gets built and pushed to ECR. I have an ECS Fargate cluster that is then pulling the image from ECR and deploying it to an ALB target group configured for port 80. However, I am getting an error when the container is being deployed onto Fargate,
Below is the error Cloudwatch logs is providing:
[FATAL tini (7)] exec /var/www/html failed: Permission denied
Any advice on how to get this simple PHP app running in a healthy state would be appreciated.