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

ความคิดเห็น • 31

  • @HaoNguyen-nl3fz
    @HaoNguyen-nl3fz 3 ปีที่แล้ว +2

    Thank you so much. Read your article/blog. This saved me after weeks of deploying this Docker thing.

  • @aytech6867
    @aytech6867 2 ปีที่แล้ว +3

    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

  • @2005Azm
    @2005Azm ปีที่แล้ว

    Your tutorials are just fantastic !

  • @cazterk
    @cazterk ปีที่แล้ว

    fantastic God bless you sir

  • @Sajee2009
    @Sajee2009 3 ปีที่แล้ว +1

    Thank you very much. Really helpful.

  • @yonis386
    @yonis386 2 ปีที่แล้ว +2

    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.

  • @josecarlosmacoratti
    @josecarlosmacoratti 3 ปีที่แล้ว +1

    Hi, How can I save the data after the SQL Server container was destroyed ?

    • @MohamadLawand
      @MohamadLawand  3 ปีที่แล้ว

      you will need to save the db info in a volume outside the container

  • @aytech6867
    @aytech6867 2 ปีที่แล้ว

    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

  • @losamanos
    @losamanos 2 ปีที่แล้ว

    Hi thank you for your tutorial but could I couldn find your source code on github 😕

  • @_MoshikoAz_
    @_MoshikoAz_ 2 ปีที่แล้ว

    Hello Mohamad,
    Does it works with m1 mac’s ?

  • @souviksardar9913
    @souviksardar9913 3 ปีที่แล้ว +1

    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.

    • @MohamadLawand
      @MohamadLawand  3 ปีที่แล้ว

      It should be in the root folder of the application

    • @souviksardar9913
      @souviksardar9913 3 ปีที่แล้ว

      ​@@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

  • @_grzehotnik
    @_grzehotnik 3 ปีที่แล้ว +1

    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.

    • @MohamadLawand
      @MohamadLawand  3 ปีที่แล้ว

      This means your sql server is not running

    • @_grzehotnik
      @_grzehotnik 3 ปีที่แล้ว

      @@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

    • @SakiKnin
      @SakiKnin 3 ปีที่แล้ว

      @@MohamadLawand Connection string is not valid)".

    • @tugbaakan7099
      @tugbaakan7099 3 ปีที่แล้ว

      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."

    • @MohamadLawand
      @MohamadLawand  3 ปีที่แล้ว

      @@tugbaakan7099 you will need to change the connection string

  • @tadsshaddy
    @tadsshaddy 3 ปีที่แล้ว

    How do you do it if the data base is already present.

    • @MohamadLawand
      @MohamadLawand  3 ปีที่แล้ว +1

      Hi Shadab, you update the connection string, create a migration script and then do database update

    • @turkodeco
      @turkodeco 3 ปีที่แล้ว

      @@MohamadLawand I cannot update the db, since the connection string is not valid

  • @buddysteve5543
    @buddysteve5543 2 ปีที่แล้ว

    YOUR MIC IS WAY TOO LOW!! TURN UP YOUR MIC!!

  • @thibao8726
    @thibao8726 3 ปีที่แล้ว +1

    Thank you very much. Really helpful