Skip to content
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

linux - init db #519

Closed
lkurzyniec opened this issue Oct 27, 2019 · 3 comments
Closed

linux - init db #519

lkurzyniec opened this issue Oct 27, 2019 · 3 comments

Comments

@lkurzyniec
Copy link

It would be great to have a possibility to initialize fresh instance with some data:

  • db name (Initial Catalog)
  • scripts to run on above db (create schema, provide data)
@nocentino
Copy link

If I understand your request correctly, this example should do what you're asking. This is part of a larger example using replication, but the initialization of the databases will use the same method.

[https://github.com/microsoft/sql-server-samples/tree/master/samples/containers/replication/db1]

@lkurzyniec
Copy link
Author

Yes, it looks like what I need, what I expect. I will try it this week and let you know about the results. Thanks!

@lkurzyniec
Copy link
Author

After couple of hours, it works as intended - it is possible to start the container with initialized db.
Honestly, it's quite hard to achieve. It's much simpler in case of either mysql or mongodb. You should make it more devfriendly ;)

One more thing - you should add 'How to' instructions onto docker hub, because people are asking about it (e.g. your issue here).

Here is my working example: https://github.com/lkurzyniec/netcore-boilerplate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants