I am trying to run container on ecs but there is one specific image which is not running and give me error. I can see in docker container ec2 that image is pulled and it tried to run but it gave following error
019ee43da7b91c68126e0d671" status="CREATED"
level=info time=2022-05-05T09:36:40Z msg="Container change also resulted in task change" desiredStatus="RUNNING" knownStatus="CREATED" task="cb091374b6ca45629c4f41bfed9c16fb" container="toxic-container" runtimeID="a6801c731cfa6ddc54ae42e0022d679cd12feab019ee43da7b91c68126e0d671"
level=info time=2022-05-05T09:36:40Z msg="Starting container" task="cb091374b6ca45629c4f41bfed9c16fb" container="toxic-container" runtimeID="a6801c731cfa6ddc54ae42e0022d679cd12feab019ee43da7b91c68126e0d671"
level=error time=2022-05-05T09:36:41Z msg="Error transitioning container" container="toxic-container" runtimeID="a6801c731cfa6ddc54ae42e0022d679cd12feab019ee43da7b91c68126e0d671" nextState="RUNNING" error="Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: \"/\": permission denied: unknown" task="cb091374b6ca45629c4f41bfed9c16fb"
level=info time=2022-05-05T09:36:41Z msg="Handling container change event" task="cb091374b6ca45629c4f41bfed9c16fb" container="toxic-container" runtimeID="a6801c731cfa6ddc54ae42e0022d679cd12feab019ee43da7b91c68126e0d671" status="RUNNING"
level=warn time=2022-05-05T09:36:41Z msg="Error starting/provisioning container[%s (Runtime ID: %s)];" task="cb091374b6ca45629c4f41bfed9c16fb" container="toxic-container" runtimeID="a6801c731cfa6ddc54ae42e0022d679cd12feab019ee43da7b91c68126e0d671" error="Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: \"/\": permission denied: unknown"
Steps to reproduce it
- I created ECS cluster on amazon with select EC2 Linux + Networking
- for Cluster name* sample
- select on-demand instance
- EC2 instance type: t2.large
- Number of instances* 1
- Key pair my key
- create new vpc
- security group used with ssh and 5000
- select ecsInstanceRole Then click to create
On the task definition
- Create new task definition
- Ec2
- Task definition name : server
- Require capatibilities: Ec2
- click Add Container a. server-container b. image: quay.io/codait/max-toxic-comment-classifier c. Memory Limit 4096 d. port mapping: host Port: 5000 , container port: 5000
- Add
Now task created so I click to run task, and it started, then it pull image and I can see image is pulled, but when it runs it give me above error.
Docker image works perfectly on local system, and it is public image.
How can I fix it?