Exec /usr/local/bin/docker-entrypoint.sh: argument list too long

exec /usr/local/bin/docker-entrypoint.sh: argument list too long
Im facing this error while deploying the docker container.

Well, as the error states, reduce the number of arguments supplied to start the container.

Helpful additional information would be:

  • docker logs from container
  • docker-compose.yml file or command line used
  • Dockerfile if used

The issue is when kubenretes tries to run the container.
In docker environment I can run the contaier.
But when it comes to kubernetes, all containers are crashing

sudo kubectl logs mysql-deployment-b566b8598-jlgp2
exec /usr/local/bin/docker-entrypoint.sh: argument list too long

If it’s k8s that is creating the issue, then check a k8s forum :smile: But they also will ask for how it’s started and what parameters are supplied.

And you tried to search for “argument list too long” on google, found multiple issues like this (my first result):

and didn’t help, right?

It is a Linux error message, not Docker. If you understand the error message, you can check your commands and find out what could cause it. If it happens only in Kubernetes, I guess you have a mounted folder or something with much more items and you try to use those all as arguments of a command which doesn’t work if you have too many.

You can find solutions in the linked StackOverflow topic, but if it doesn’t help then you indeed need to share what you are doing in the script.