GithubHelp home page GithubHelp logo

Comments (6)

bmmathe avatar bmmathe commented on May 21, 2024 8

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).

from mssql-docker.

twright-msft avatar twright-msft commented on May 21, 2024

@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?

from mssql-docker.

bmmathe avatar bmmathe commented on May 21, 2024

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.

from mssql-docker.

LuisBosquez avatar LuisBosquez commented on May 21, 2024

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

from mssql-docker.

rabih-harb avatar rabih-harb commented on May 21, 2024

$ 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)...

from mssql-docker.

maxfunke avatar maxfunke commented on May 21, 2024

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.

from mssql-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.