Problem: Container command '/bin/sh' not found or does not exist

Expected behavior

running fine within Docker toolbox.

$ docker build -t foo .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM microsoft/iis
—> c26f4ceb81db
Step 2 : RUN powershell remove-item c:\inetpub\wwwroot\iisstart.*
—> Running in 4d17a5ab86e5
—> d5f85251b3db
Removing intermediate container 4d17a5ab86e5
Successfully built d5f85251b3db

Actual behavior

Got error running with native docker for Mac.

$ docker build -t foo .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM microsoft/iis
—> c26f4ceb81db
Step 2 : RUN powershell remove-item c:\inetpub\wwwroot\iisstart.*
—> Running in fbb4b9fc66b5
Container command ‘/bin/sh’ not found or does not exist.

Information

  • the output of:
    • pinata diagnose -u on OSX
    • DockerDebugInfo.ps1 using Powershell on Windows
  • a reproducible case if this is a bug, Dockerfiles FTW
  • page URL if this is a docs issue or the name of a man page
  • host distribution and version ( OSX 10.10.x, OSX 10.11.x, Windows, etc )

$ pinata diagnose -u
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.1-beta12
Running diagnostic tests:
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160520-121731.tar.gz

Steps to reproduce the behavior

  1. $ cat Dockerfile

FROM microsoft/iis
RUN powershell remove-item c:\inetpub\wwwroot\iisstart.*
2. docker build -t foo .