LightSail containers Launch command

0

in LightSail Container Service, under Configuration, how is the "Launch command" used?

There example placeholder text in the Text input field "launch.sh" but no explanation.

I'm looking to run a curl command to download a file into container at deployment time, but this break the container startup.

질문됨 25일 전124회 조회
2개 답변
0

Hello.

According to the explanation in the document, it seems that you can write bash commands to configure the container.
https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-container-services-deployments.html#creating-deployments-container-entry

Launch command – Specify a launch command to run a shell script or a bash script that configures your container when it's created. A launch command can do things like add software, update software, or configure your container in some other way.

By the way, is the curl command installed in the container image you are using?
Also, did any errors occur when the deployment was interrupted?

profile picture
전문가
답변함 25일 전
  • I would like a run shell commands directly. example: bash -c echo "x" or /bin/bash -c 'curl https://www.google.com'. I tried this and the deployment fails and the container endpoint url does not load. The logs only show a "timeout" but nothing related to the launch command. I can build a new image with my own custom shell script to push to LightSail, I suppose, but would like to avoid this if possible.

0

It requires that your project has the launch.sh in it and the dockerfile has a command to copy it to the root/working directory of the image

jdub
답변함 8일 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠