- Newest
- Most votes
- Most comments
Hi Frank,
You need to ensure there is a process running in the foreground to keep the container running. Since you mentioned that you have not specified a launch command, it then depends on the command set to be run by default when the image is launched ie ENTRYPOINT or CMD settings
Its a bit unclear if you are directly launching a container using amazonlinux:2018.03 or a custom image which includes your application built on top of amazonlinux:2018.03. If you are directly using amazonlinux:2018.03 without any launch command in Lightsail then you can expect the deployment to fail since there is no process running in the foreground. It executes the shell and exits. Also you actually need to build a custom image locally, upload it to repository and then use that image in the container definition so as to have the application running in Lightsail. If you are already using the custom image, then the previous comment about process running the foreground would be the likely cause based on info shared. In either case you can validate that by running the image locally without any arguments to verify if the container is running or exits
--Syd
Thank you for your answer. So far I‘m using just a plain AmazonLinux-Image, no app installed so far. What was confusing me: I could run the AmazonLinux-Image on my local docker installation and connecting to it using a shell. But I guess this does not work in Lightsail containers. So I will build my own docker image based on AmazonLinux with my test app deployed on it.
Once again thank you a lot - your answer makes totally sense.
Best Regards,
Frank
I am having the same issue with postgres. For example registry.hub.docker.com/postgres:14-alpine
does NOT work. But registry.hub.docker.com/containous/whoami
works without issue. Both are not custom, they are public containers... how can I run Postgres?
If using Amazon ECR private repositories, make sure the repository is connected in the Images tab of the service deployment.
If not connected (or if you are using a different image, ehm) it will give no error but cancel the deployment.
Relevant content
- asked 2 years ago
- asked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 6 months ago
I understand you try to deploy a container on LightSail service. The failure seems to be related to the container itself, can you detail a bit more what you are trying to achieve? Dockerfile content (or directives) and your deployment. You can start a first deployment with our example hello-world container: https://gallery.ecr.aws/amazon-lightsail/hello-world. You can also learn about deployment on this documentation: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-container-services-deployments