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 eg.run.sh) 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.

ENTRYPOINT["/path/myprocess",
           "arg1",
           "arg2" ]

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

  • 3 different applications and docker containers
  • Is there any possible way to create a docker image without docker installed on my development machine?
  • Airflow inside docker running a docker container
  • Building sphinx documents inside Docker container
  • How do I enter this dockerfile / nginx container?
  • renaming docker0 virtual bridge name to something else
  • Step 14 : ENTRYPOINT[
    Unknown instruction: ENTRYPOINT[
    

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

  • docker file not found
  • Is there an agreed UML diagram style for documenting or illustrating the role of (Docker) containers in a system architecture specification?
  • Can one Java installation on host manage multiple applications deployed in docker container
  • docker-compose replica hostname
  • docker build in run time or docker compose from images
  • Disabling docker image tag updating
  • 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.