Docker multiline CMD or ENTRYPOINT

I have a really long command line for the default process due to a number of arguments. I think the easiest would be to create a script (for and then call this script in your ENTRYPOINT or CMD. I’m wondering if there is a way to make your ENTRYPOINT or CMD multiline (the way we write RUN). For eg.

           "arg2" ]

I was thinking this is a valid syntax since the format is json. However, docker build throws the error

  • Does docker stack deploy work with local images
  • Published k8s service is not available
  • How to find Docker container's layer ID and reuse it in another container
  • Nginx SSL inside a docker container
  • Controlling the Data of a Database Docker Container
  • What is the purpose of VOLUME in Dockerfile
  • Step 14 : ENTRYPOINT[
    Unknown instruction: ENTRYPOINT[

    Is there a way I can split the ENTRYPOINT to multiple lines?

  • docker is great for run-anywhere but what about the machines to host docker?
  • how to make docker client connect to docker daemon over http
  • Docker compose global level logging
  • NGINX as reverse proxy on another container - how to configure the config files
  • How to mount docker volume with jenkins docker container?
  • Can't communicate with simple Docker Node.js web app
  • One Solution collect form web for “Docker multiline CMD or ENTRYPOINT”

    It was a typo in the dockerfile. I missed a space between ENTRYPOINT and [. Dockerfile supports multiline ENTRYPOINT and CMD by terminating the line with \, same as RUN. So, in my case it can be

    ENTRYPOINT [ "/path/myprocess", \
                 "arg1",            \
                 "arg2"             \
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.