Arguments are split on whitespace in Windows

Hi. I’m trying to follow this hello-world daemon guide from docker (on Windows 8.1). When I run the command: docker run -d ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done" the hello-world program won’t run. Logging the container I receive the following: true;: 1: true;: Syntax error: end of file unexpected. If I inspect the container, the arguments input seem to be split on whitespaces:

Running the same command on a Mac, the arguments are not split on whitespaces.

Any ideas what I should do?

I couldn’t replicate on a windows 7 machine.very bizarre have you just tried single quotes?

docker run -d ubuntu /bin/sh -c ‘while true; do echo hello world; sleep 1; done’

Also what kind of shell are you launching this from in windows?

I get the same error with single quotes, and with/without quoting the “hello world” text.

I’m using the one that is bundled with the docker installer. The icon is just named “Docker Quickstart Terminal”, which, based on its properties, looks like the one that is bundled with Git (MINGW64). On a side note, I completely uninstalled Docker and everything git-related, then reinstalled Docker. Still have the same issues.