diff --git a/builder/docker/config.go b/builder/docker/config.go index 6116a995b..ef2d52a63 100644 --- a/builder/docker/config.go +++ b/builder/docker/config.go @@ -73,7 +73,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) { // Defaults if len(c.RunCommand) == 0 { - c.RunCommand = []string{"-d", "-i", "-t", "{{.Image}}", "/bin/bash"} + c.RunCommand = []string{"-d", "-i", "-t", "--entrypoint=/bin/sh", "--", "{{.Image}}"} } // Default Pull if it wasn't set diff --git a/website/source/docs/builders/docker.html.md b/website/source/docs/builders/docker.html.md index a0dddfc78..d5ef7c632 100644 --- a/website/source/docs/builders/docker.html.md +++ b/website/source/docs/builders/docker.html.md @@ -210,7 +210,7 @@ You must specify (only) one of `commit`, `discard`, or `export_path`. - `run_command` (array of strings) - An array of arguments to pass to `docker run` in order to run the container. By default this is set to - `["-d", "-i", "-t", "{{.Image}}", "/bin/bash"]`. As you can see, you have a + `["-d", "-i", "-t", "{{.Image}}", "/bin/sh"]`. As you can see, you have a couple template variables to customize, as well. - `volumes` (map of strings to strings) - A mapping of additional volumes to