I'm trying to start a task with a container with the following command:
/bin/sh -c "export KAFKA_LISTENERS=\"PLAINTEXT://$$(hostname -i):9092\" && start-kafka.sh"
But I'm getting this error when the container tries to start and I have no idea of what might be causing it:
CannotStartContainerError: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/bin/sh -c \\\"export KAFKA_LISTENERS=\\\\\\\"PLAINTEXT://$$(hostname -i):9092\\\\\\\" && start-kafka.sh\\
The weird thing is that the error only happens in AWS, if I create a docker compose file and run it locally everythig works fine.
Any ideas?
Thank you!