Step by step guide on utilising Docker Compose with Asp.Net Core, SQL Server
ฝัง
- เผยแพร่เมื่อ 15 ต.ค. 2024
- This video will show you step by step how to create a Docker Compose file for an ASP.Net core application and SQL Server Database utilising the entity framework code first approach.
Source code:
github.com/moh...
Visual Studio code:
code.visualstu...
DotNet core SDK:
dotnet.microso...
Docker download:
www.docker.com...
Docker extension to VS code code.visualstu...
Let us connect:
🌍 My website - mohamadlawand.com
📸 Instagram - / mohamadlawand087
🐦 Twitter - / moe23
♯ Github - github.com/moh...
🎫 LinkedIn - / mlawand
💥 LinkTree - linktr.ee/moha...
Gear I use (affiliate link): amzn.to/3EbT8Jw
Support my work:
/ mohamadlawand
www.buymeacoff...
Hire Me:
transactions.s...
WHO AM I:
I'm Mohamad, a Enterprise Architect working in Manchester, UK. I make videos about web, cloud, desktop and mobile development.
GET IN TOUCH:
If you’d like to talk, I’d love to hear from you. Tweeting @moe23 directly will be the quickest way to get a response, but if your question is very long, feel free to email me at hello@mohamadlawand.com.
#dotnet #docker #docker-compose #beginners #efcore #aspnetcore
Thank you so much. Read your article/blog. This saved me after weeks of deploying this Docker thing.
Hello dear please make sure to raise your voice volume and to zoom in when typing any code . Please take it as a constructive criticism. Thank you for your informative videos
Your tutorials are just fantastic !
fantastic God bless you sir
Thank you very much. Really helpful.
Great content thanks, my question is can we run the docker-compose from the published file of the .net application instead of using the project folder. the reason i asked is the connection string is only spcified on the appsetting.json of the published file. i didnt use any environment variables as you did in the program.cs file i seem to be getting error all the time " network related error ..... ' could you please share any resources about this or make a video abut it thanks.
Hi, How can I save the data after the SQL Server container was destroyed ?
you will need to save the db info in a volume outside the container
Dear you know in the thumbnail you have put azure logo I thought that you are gonna use also azure devops ci cd with them . Dear are you gonna do asp.net with docker sql image than push it to devops ci cd piplines . I haven't found such video. Thank you
Hi thank you for your tutorial but could I couldn find your source code on github 😕
Hello Mohamad,
Does it works with m1 mac’s ?
Thank you so much. I have learnt lot of things from this. one quick question, where I can find the 'booksdb' database? what will be the server to connect to get the table using SA credential?
I have connected server with name (local), (.), localhost, (localdb)\MSSQLLocalDB and entered username as SA & respective password. I was able to login in all these servers but no where I found 'booksdb' database.
It should be in the root folder of the application
@@MohamadLawand I am sorry to say I can't find the server name/ table itself in the root folder. I followed exactly what you did and it's working fine but cant find the table. Can you please help me on this?
I checked each and every files of root folder, I found few .pdb files but those are encrypted. Where I can get the server name so that I can connect that server from SQL Server Management Studio to get the 'Books' table
The code does not work. The exception I get is: " Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correc
t and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 25 - Connection string is not valid)".
I downloaded the code from github, that does not work either.
This means your sql server is not running
@@MohamadLawand It is running: postimg.cc/Y4fGwmvk
And I'm able to connect to this instance using SSMS with the port number and password given in the tutorial
@@MohamadLawand Connection string is not valid)".
Yeah, I downloaded the code and I get error too. Could it be because my computer OS is Windows ?
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections."
@@tugbaakan7099 you will need to change the connection string
How do you do it if the data base is already present.
Hi Shadab, you update the connection string, create a migration script and then do database update
@@MohamadLawand I cannot update the db, since the connection string is not valid
YOUR MIC IS WAY TOO LOW!! TURN UP YOUR MIC!!
Thank you very much. Really helpful