{"action":"created","issue":{"url":"https://api.github.com/repos/twright-msft/mssql-node-docker-demo-app/issues/9","repository_url":"https://api.github.com/repos/twright-msft/mssql-node-docker-demo-app","labels_url":"https://api.github.com/repos/twright-msft/mssql-node-docker-demo-app/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/twright-msft/mssql-node-docker-demo-app/issues/9/comments","events_url":"https://api.github.com/repos/twright-msft/mssql-node-docker-demo-app/issues/9/events","html_url":"https://github.com/twright-msft/mssql-node-docker-demo-app/issues/9","id":294134395,"node_id":"MDU6SXNzdWUyOTQxMzQzOTU=","number":9,"title":"db container exited with code 0","user":{"login":"rdalfonso","id":4713950,"node_id":"MDQ6VXNlcjQ3MTM5NTA=","avatar_url":"https://avatars0.githubusercontent.com/u/4713950?v=4","gravatar_id":"","url":"https://api.github.com/users/rdalfonso","html_url":"https://github.com/rdalfonso","followers_url":"https://api.github.com/users/rdalfonso/followers","following_url":"https://api.github.com/users/rdalfonso/following{/other_user}","gists_url":"https://api.github.com/users/rdalfonso/gists{/gist_id}","starred_url":"https://api.github.com/users/rdalfonso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdalfonso/subscriptions","organizations_url":"https://api.github.com/users/rdalfonso/orgs","repos_url":"https://api.github.com/users/rdalfonso/repos","events_url":"https://api.github.com/users/rdalfonso/events{/privacy}","received_events_url":"https://api.github.com/users/rdalfonso/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-03T18:35:55Z","updated_at":"2018-07-11T16:03:17Z","closed_at":null,"author_association":"NONE","body":"This setup runs my setup.sql script, creates my database and switches context to that the database and then the container 'exited with code 0'."},"comment":{"url":"https://api.github.com/repos/twright-msft/mssql-node-docker-demo-app/issues/comments/404223877","html_url":"https://github.com/twright-msft/mssql-node-docker-demo-app/issues/9#issuecomment-404223877","issue_url":"https://api.github.com/repos/twright-msft/mssql-node-docker-demo-app/issues/9","id":404223877,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDIyMzg3Nw==","user":{"login":"tobske","id":13568578,"node_id":"MDQ6VXNlcjEzNTY4NTc4","avatar_url":"https://avatars3.githubusercontent.com/u/13568578?v=4","gravatar_id":"","url":"https://api.github.com/users/tobske","html_url":"https://github.com/tobske","followers_url":"https://api.github.com/users/tobske/followers","following_url":"https://api.github.com/users/tobske/following{/other_user}","gists_url":"https://api.github.com/users/tobske/gists{/gist_id}","starred_url":"https://api.github.com/users/tobske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobske/subscriptions","organizations_url":"https://api.github.com/users/tobske/orgs","repos_url":"https://api.github.com/users/tobske/repos","events_url":"https://api.github.com/users/tobske/events{/privacy}","received_events_url":"https://api.github.com/users/tobske/received_events","type":"User","site_admin":false},"created_at":"2018-07-11T16:03:17Z","updated_at":"2018-07-11T16:03:17Z","author_association":"NONE","body":"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.\r\nMaybe this helps someone with a similar issue."}}
{"actor":{"display_login":"tobske"}}