github.com/yrj2011/jx-test-infra@v0.0.0-20190529031832-7a2065ee98eb/third_party/moby/dockerd-entrypoint.sh (about)

     1  #!/bin/sh
     2  set -e
     3  
     4  # no arguments passed
     5  # or first arg is `-f` or `--some-option`
     6  if [ "$#" -eq 0 -o "${1#-}" != "$1" ]; then
     7    # add our default arguments
     8    set -- dockerd \
     9      --host=unix:///var/run/docker.sock \
    10      --host=tcp://0.0.0.0:2375 \
    11      --storage-driver=overlay \
    12      "$@"
    13  fi
    14  
    15  if [ "$1" = 'dockerd' ]; then
    16    # if we're running Docker, let's pipe through dind
    17    # (and we'll run dind explicitly with "sh" since its shebang is /bin/bash)
    18    set -- sh "$(which dind)" "$@"
    19  fi
    20  
    21  exec "$@"