Default Docker entrypoint

I am creating an image from another image that set a specific entrypoint. However I want my image to have default one. How do I reset the ENTRYPOINT?

I tried the following Dockerfile:

  • Docker container doesn't reload Angular app
  • docker selenium hub not accessible from different machine (in same network) [docker selenium grid not working]
  • Reduce memory consumption in rake assets:precompile
  • Issues with running a consul docker health check
  • Docker Container from php:5.6-apache as root
  • /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
  • FROM some-image
    ENTRYPOINT ["/bin/sh", "-c"]

    Unfortunately it doesn’t work like the default entrypoint as it need the command to be quoted.

    docker run myimage ls -l /    # "-l /" arguments are ignored
    file1 file2 file3             # files in current working directory
    docker run myimage "ls -l /"  # works correctly

    How do I use commands without quoting?

  • Connection refused: PHPUnit selenium in Docker
  • .docker/config.json vs .dockercfg
  • Unable to run Spring Mvc tutorial example in a tomcat Docker
  • Can't clone public repo from within Dockerfile
  • docker how to commit but exclude directory from image
  • restart nginx container when upstream servers is updated
  • One Solution collect form web for “Default Docker entrypoint”

    To disable an existing ENTRYPOINT, set an empty array in your docker file


    Then your arguments to docker run will exec as normal.

    The reason your ENTRYPOINT ["/bin/sh", "-c"] requires quoted strings is that without the quotes, the arguments to ls are being passed to sh instead.

    Unquoted results in lots of arguments to sh

    "/bin/sh", "-c", "ls", "-l", "/"

    Quoting allows the complete command (-c) to be passed to sh

    "/bin/sh", "-c", "ls -l /"
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.