Docker Community Forums

Share and learn in the Docker community.

SQL image stop immediately at Docker-compose up

To test why my SQL server image is not working, I removed the start.ps1 script witch is starting the SQL service and I simply launch powershell as CMD to start the service manually.

COPY start.ps1 /
#CMD .\start -sa_password $env:sa_password -Verbose
CMD powershell

The issue is I can’t because the container is not running and exits immediately with a code 0 because no process is holding up.

I get this:

Recreating mssql … done
Attaching to mssql
mssql | Microsoft Windows [Version 10.0.17763.615]
mssql | © 2018 Microsoft Corporation. All rights reserved.
mssql |
mssql | C:>mssql exited with code 0

In my previous project with linux images, we can add tty: true and this works.
If I do that with this Windows image, I get this error:

mssql |
mssql |
Traceback (most recent call last):
File “docker-compose”, line 6, in
File “compose\cli\”, line 71, in main
File “compose\cli\”, line 127, in perform_command
File “compose\cli\”, line 1111, in up
File “compose\cli\”, line 105, in run
File “compose\cli\”, line 109, in write
File “site-packages\colorama\”, line 41, in write
File “site-packages\colorama\”, line 154, in write
File “site-packages\colorama\”, line 176, in write_and_convert
File “site-packages\colorama\”, line 248, in convert_osc
File “site-packages\colorama\”, line 169, in set_title
File “site-packages\colorama\”, line 152, in SetConsoleTitle
ctypes.ArgumentError: argument 1: <class ‘ValueError’>: embedded null character

I’m stuck and I don’t know what to do !
Any help ?

1 Like