Add docker run option in Task Definition

0

hi,

I'm trying to get my docker to start up in ECS with docker run options. I'm trying to have my task mirror this command:

docker run --env PRIVATE_LOCATION_KEY=(value} -d --restart unless-stopped {Docker Image}

I was able to add the PRIVATE_LOCATION_KEY to the environment section of the Task Definition. Just can't figure out how to add the "-d --restart unless-stopped" part

When I run this command directly on an instance, the container starts. But when I take out the option, I get the same error both when doing it manually or using a task.

Update: In looking into this a little more, it looks like I just have to figure out how to add the "-d" or "--detach" option to my task definition or just get the container to start in detach mode

Anyone have any suggestions?

Thanks

질문됨 일 년 전314회 조회
1개 답변
0

-d is implicit; there is no terminal when ECS launches a task. What errors are you seeing?

profile picture
답변함 일 년 전

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

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

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

관련 콘텐츠