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
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.
How to deploy Amazon Linux on a Lightsail Container Service?Accepted Answer
How to deploy ECR private image to Lightsail containersasked 3 months ago
Do lightsail container services have a public IP?asked 2 months ago
Not able to deploy daemon java process in Lightsail Container Serviceasked 4 months ago
Lightsail - container "Took too long" to deploy all of a sudden (Nothing in logs)asked a year ago
Deployment of Amazon Linux 2 on Lightsail ECS is canceledAccepted Answer
Lightsail container - specific public portasked 10 months ago
Lightsail Container Linux Deployment fails
How to create Kali Linux container on LightSailasked 2 months ago
Lightsail Container Timeoutasked 8 months ago