Comments (5)
I don't use the npm part of the setup and only execute sqlserver
and import-data.sh
in the entrypoint.sh
. If I kept the order of those two the same in the entrypoint.sh
my container is stopping at the end, too. If I switch those two the container stays up. The reason is that because of the &
the first command is executed in the in a subshell which means that the outer shell does not wait for this command to finish so it only waits for the second command. If this second command is the import-data.sh
which ends after sometime the whole shell and so the whole container will finish. It the order is switched the outer shell is waiting for the sqlserver
to end and as this command does not end normally the container stays open.
There is some explanation for this here: https://www.gnu.org/software/bash/manual/bash.html#Lists
Maybe this helps someone with a similar issue.
from mssql-node-docker-demo-app.
the problem is with the bulk load of the file. Inspect the logs with docker logs <container_id>
Starting copy... SQLState = S1000, NativeError = 0 Error = [Microsoft][ODBC Driver 13 for SQL Server]Unexpected EOF encountered in BCP data-file
then the container stops. the scripts starts after 90 seconds.
I have converted the file endings to because i run on Linux to LF and the error goes away but still the container exits.
the BCP is causing the problem I guess
** update **
When removing the import-data.sh script completely the container stays up. BCP is not the problem because setup.sql also causes the container to stop.
from mssql-node-docker-demo-app.
Yes, exactly @tobske . We've recently updated the documentation to provide this tip as well. https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-docker?view=sql-server-linux-2017#customcontainer
@rdalfonso abd @aplanting - can you confirm that changing the order of the commands resolves the issue for you?
from mssql-node-docker-demo-app.
@twright-msft , I can confirm that if you change the order the container will continue running. There is an exemple in my github.
https://github.com/MarlomSouza/database_docker
from mssql-node-docker-demo-app.
Thanks for sharing @MarlomSouza . I'm going to go ahead and close out this issue. @rdalfonso or @aplanting - if this is still an issue after trying the above recommendations, please reactivate.
from mssql-node-docker-demo-app.
Related Issues (14)
- Docker-compose newbie question HOT 5
- Separation of concerns? HOT 3
- An alternative to the 90 second sleep HOT 2
- Keep container alive without node HOT 2
- Entrypoint HOT 1
- how to persistent data? HOT 1
- sa login fails HOT 1
- not working with latest sqlserver 2019 HOT 3
- guanishu de prueba
- This sample doesn't work at all with current sqlserver 2019 docker version HOT 2
- Image ms sql without node.js
- Did exactly what is done in this demo, but i am getting : Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'CIT'. HOT 2
- Question tailing microsoft/mssql-server-linux logs HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mssql-node-docker-demo-app.