New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running the docker commands from a Windows client causes the container to exit immediately #20

Closed
bmmathe opened this Issue Jan 19, 2017 · 6 comments

Comments

Projects
None yet
5 participants
@bmmathe
Copy link

bmmathe commented Jan 19, 2017

Trying to install the container from a Windows docker client causes an ERROR stating you must Accept the EULA. Presumably -e does not modify the environment variables on a Windows client.

@twright-msft

This comment has been minimized.

Copy link
Collaborator

twright-msft commented Jan 19, 2017

@bmmathe - Can you please clarify - are you trying to run a SQL on Linux container on Docker for Windows or a SQL on Windows container?

@bmmathe

This comment has been minimized.

Copy link

bmmathe commented Jan 19, 2017

I'm using the sample located here: https://hub.docker.com/r/microsoft/mssql-server-linux/
My Docker host is Ubuntu running in Azure yet I'm running the docker commands from my local Windows 10 machine. I have my docker cli environment setup to point to the Linux host. All other docker run commands work with no problems but when I run "docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=' -p 1433:1433 -d microsoft/mssql-server-linux" the command exits. If I run docker ps -a I can see that the container only ran for a couple seconds. When I pipe the stdout and stderr out to the console (-a stdout -a stderr) I can see that the container issues an "ERROR: You must accept the EULA" comment.

To workaround this I spun up a different Ubuntu box in Azure and ran the same command from it pointing my docker cli to the same host and it worked with no problems.

I believe the issue is with the -e argument. The way it interacts with the command Environment Variables does not work in Windows.

Here is a copy of my command window with the password removed:

docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=' -p 1433:1433 -a stdin -a stdout -a stderr microsoft/mssql-server-linux
ERROR: You must accept the End User License Agreement before this container
can start. The End User License Agreement can be found at
http://go.microsoft.com/fwlink/?LinkId=746388.
Set the environment variable ACCEPT_EULA to 'Y' if you accept the agreement.

@bmmathe bmmathe changed the title Running the container from a Windows client causes the container to exit immediately Running the docker commands from a Windows client causes the container to exit immediately Jan 19, 2017

@bmmathe

This comment has been minimized.

Copy link

bmmathe commented Jan 19, 2017

My colleague just informed me that when running -e parameters in the Windows Docker CLI you must use double quotes instead of single ticks (at least when using CMD).

@LuisBosquez

This comment has been minimized.

Copy link
Contributor

LuisBosquez commented Jan 19, 2017

Thanks for finding this @bmmathe! I have added this to the README under Troubleshooting.

@rabih-harb

This comment has been minimized.

Copy link

rabih-harb commented Apr 21, 2017

$ docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=abc@123" -p 1433:1433 -a stdin -a stdout -a stderr microsoft/mssql-server-linux <---
u get this
Configuring Microsoft(R) SQL Server(R)...

@maxfunke

This comment has been minimized.

Copy link

maxfunke commented Nov 12, 2017

As i used -a stdin -a stout -a stderr I realized that there actually is a notification, why the container stopped/never started:

sqlservr: This program requires a machine with at least 3250 megabytes of memory.

So I just had to increase memory for docker and it run just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment