/bin/sh: 0: Illegal option -

Issue Type: writing a Dockerfile.
OS Version: macOS Catalina 10.15
App version: 19.03.2 (assuming this means Docker Version)

Steps to reproduce:

Here’s my Dockerfile

FROM mcr.microsoft.com/mssql/server:2019-CTP3.2-ubuntu

RUN -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=mypassword" \
    -p 1433:1433 --name sql1 \
    -d mcr.microsoft.com/mssql/server:2019-CTP3.2-ubuntu

I then navigate to where the file is and run

docker build .

Then I get this error message:

/bin/sh: 0: Illegal option - 
The command '/bin/sh -c -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=mypassword"     -p 1433:1433 --name sql1     -d mcr.microsoft.com/mssql/server:2019-CTP3.2-ubuntu' returned a non-zero code: 2

Can anyone help me with this?

Your Dockerfile is not a Dockerfile. A RUN declaration would be valid, if it would consist of command. Though your RUN declaration pretty much looks like options for a docker run command to actualy create and run a container.

Try this command to create and start the container:
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=mypassword" \ -p 1433:1433 --name sql1 \ -d mcr.microsoft.com/mssql/server:2019-CTP3.2-ubuntu