Deploy https://gallery.ecr.aws/docker/library/httpd to apprunner failed

0

I tried to deploy https://gallery.ecr.aws/docker/library/httpd to apprunner and it failed.

Service settings has

Service name
sampleapprunner-service
Virtual CPU & memory
1 vCPU & 2 GB
Port
8080

App Runner event logs

02-01-2024 01:11:11 PM [AppRunner] Deployment with ID : d706d4935b7840d4ba12ff7ec8ac3a86 started. Triggering event : SERVICE_CREATE
02-01-2024 01:11:11 PM [AppRunner] Deployment Artifact: [Repo Type: ECR-Public], [Image URL: public.ecr.aws/docker/library/httpd], [Image Tag: alpine3.19]
02-01-2024 01:11:37 PM [AppRunner] Pulling image public.ecr.aws/docker/library/httpd from ECR-Public repository.
02-01-2024 01:11:38 PM [AppRunner] Successfully pulled your application image from ECR.
02-01-2024 01:11:48 PM [AppRunner] Provisioning instances and deploying image for publicly accessible service.
02-01-2024 01:11:58 PM [AppRunner] Performing health check on protocol `TCP` [Port: '8080'].
02-01-2024 01:18:09 PM [AppRunner] Health check failed on protocol `TCP` [Port: '8080']. Check your configured port number. For more information, see the application logs.
02-01-2024 01:18:21 PM [AppRunner] Deployment with ID : d706d4935b7840d4ba12ff7ec8ac3a86 failed. Failure reason : Health check failed.

Health check settings

Protocol
TCP
Path
—
Timeout
5 seconds
Interval
10 seconds
Unhealthy threshold
5 requests
Health threshold
1 requests
已提问 3 个月前158 查看次数
1 回答
0

Hi,

based on https://gallery.ecr.aws/docker/library/httpd

The container responds initially on port 80. There is a port remapping done to 8080 via -p on the doc

Then, run the commands to build and run the Docker image:

$ docker build -t my-apache2 .
$ docker run -dit --name my-running-app -p 8080:80 my-apache2

Best,

Didier

profile pictureAWS
专家
已回答 3 个月前
  • Can we achieve this port mapping for App runner from AWS console?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则