.NET Docker Tutorial - SQL Server Docker [.NET Docker]

Поделиться
HTML-код
  • Опубликовано: 17 янв 2025

Комментарии • 105

  • @CodingDroplets
    @CodingDroplets  2 года назад

    ⭐ Join Us on Patreon: www.patreon.com/CodingDroplets
    Microservices Tutorial Playlist Link: ruclips.net/video/gPInkLCfalE/видео.html

  • @faviorequena7342
    @faviorequena7342 11 месяцев назад +2

    I have spent a lot of time researching how to do this and you have done it and explained it in an incredible way. Thank you for this.

    • @CodingDroplets
      @CodingDroplets  11 месяцев назад

      Glad to hear that you found the tutorial helpful!

  • @vijai851
    @vijai851 10 дней назад +1

    Finally and a-z one. Thank you guys!

  • @muhammadzaakirmungrue3146
    @muhammadzaakirmungrue3146 Год назад +2

    People like you I encourage me to teach others because It's not always as easy as making a docker file and image and use the correct DB connection string .

    • @CodingDroplets
      @CodingDroplets  Год назад

      Thank you for your kind words! I'm glad to hear that my tutorial has inspired you to teach others.

  • @talkathiriify
    @talkathiriify 11 месяцев назад +2

    Excellent explanation ever for docker container and images.
    Thank you very much.

    • @CodingDroplets
      @CodingDroplets  11 месяцев назад

      Thank you so much for your kind words! Glad to hear that.

  • @kittkillward9014
    @kittkillward9014 7 месяцев назад +1

    wow it feels nice when you follow tutorial and all works in the end (except part where I searched how to use sql server 2022 instead of 2019)

    • @CodingDroplets
      @CodingDroplets  7 месяцев назад

      I'm glad to hear the tutorial worked well for you! For using SQL Server 2022 you can use the SQL Server Docker image available at:
      mcr.microsoft.com/product/mssql/server/about

  • @refre07
    @refre07 6 месяцев назад +2

    Nice video, It aswered the question I had on creating docker network. Thanks

    • @CodingDroplets
      @CodingDroplets  6 месяцев назад

      Thank you! Glad to know the video answered your question.

  • @fisnik8965
    @fisnik8965 2 года назад +1

    Amazing tutorial with very valuable lessons in it. For me it was the networking part which gave me the answers I needed.

  • @gage98
    @gage98 2 года назад +2

    The Teacher I never had!

  • @omartorresrios8216
    @omartorresrios8216 Год назад +1

    Your video is incredible, thanks for the information you share, the only thing missing from the video is talking about volumes.

    • @CodingDroplets
      @CodingDroplets  Год назад +1

      Thank you for your positive feedback on the tutorial and for sharing your suggestion. I'm glad you found the video incredible and valuable.
      You're absolutely right that discussing volumes in the context of SQL Server Docker containers would have been beneficial in the tutorial. Volumes are an essential aspect of containerization, as they allow for persistent storage of data and can greatly enhance the flexibility and scalability of your containerized applications.
      While the specific topic of volumes was not covered in this particular video, I appreciate your feedback and will take it into consideration for future tutorials. In upcoming videos, I'll make sure to include discussions on volumes and their importance in containerized environments.

  • @verbroez712
    @verbroez712 5 месяцев назад +1

    Wow, this tutorial is awesome. Thanks ❤

    • @CodingDroplets
      @CodingDroplets  5 месяцев назад

      Thank you so much! Glad to hear that.

  • @DreamWalker886
    @DreamWalker886 Год назад +1

    Very clear and concise

  • @suleymanyavas8806
    @suleymanyavas8806 Год назад +1

    Thank you for this great tutorial.
    You explained it verry well!
    it helped me understand docker and docker compose.
    again thank you for the afford.

    • @CodingDroplets
      @CodingDroplets  Год назад

      You're very welcome! I'm glad to hear that the tutorial was helpful and that it aided in your understanding of Docker and Docker Compose. Your kind words and appreciation mean a lot to me.

  • @mankgwanyanetlaka
    @mankgwanyanetlaka 11 месяцев назад +1

    Great explaination. Thanks bud.

    • @CodingDroplets
      @CodingDroplets  11 месяцев назад

      I'm glad you found the explanation helpful! Thank you for watching and for your feedback.

  • @chamarthi123ful
    @chamarthi123ful 2 года назад +1

    Great explanation, Thank you. Waiting for next session.
    if possible can please do video on how microservice communicate to other microservice using service bus and any different ways

    • @CodingDroplets
      @CodingDroplets  2 года назад +1

      You are most welcome. Thank You for commenting your thoughts.
      This series named Microservice Architecture will be a beginner to advanced tutorial series.
      So initially we'll be developing the projects in a simpler way. Gradually we'll add more advanced functionalities to the series. So that the beginners will be able to understand concepts clearly.
      We'll be adding more functionalities like event bus, messaging protocols, background services to process long running tasks, gRPC API microservice etc in the later sessions.

  • @gleamofcolor
    @gleamofcolor 10 месяцев назад

    Nice video, i am looking for this kind of videos. Thaks for your time and effort to make this video 😊

  • @wailamashtandagamer7285
    @wailamashtandagamer7285 2 месяца назад +1

    finally found something that helped...

  • @СергейИванченков-ДляСвоих

    You are awesome! Great video. Keep 'em coming.

    • @CodingDroplets
      @CodingDroplets  Год назад

      Thank you so much for your enthusiastic comment! We're glad that you enjoyed the video and found it helpful.
      Your kind words and encouragement mean a lot to us. We're committed to creating more informative and engaging tutorials.

  • @paulpurington8637
    @paulpurington8637 Год назад +1

    Great instructional video!!

    • @CodingDroplets
      @CodingDroplets  Год назад

      Thank you so much for your positive feedback! I'm thrilled to hear that you found the instructional video great.

  • @TariqulIslam-k4v
    @TariqulIslam-k4v 2 месяца назад +1

    Excellent

  • @OnTheSpurOfTheMoment
    @OnTheSpurOfTheMoment Год назад +7

    But the data is gone once you bring it down. You should have included volumes in your tutorial.

    • @CodingDroplets
      @CodingDroplets  Год назад +2

      Thank you for your feedback! You're absolutely right, and I appreciate your observation. Including volumes in a Docker setup is indeed a crucial aspect. I'll consider creating an additional tutorial that specifically covers the usage of volumes.

  • @bh4541
    @bh4541 Год назад +4

    for someone who struggling when follow the video but cant access sql server after F5 , connectionstring should be
    $"Data Source=host.docker.internal;Database={dbName};User ID=sa;Password={dbPassword}";

  • @joao-no5oj
    @joao-no5oj 10 месяцев назад +1

    3:03 How can I port myself at server startup using ef migrations?? This work? Or I need to use Database.Migrations()

    • @CodingDroplets
      @CodingDroplets  10 месяцев назад

      To automatically apply EF migrations at server startup in a Docker container, you can use the approach of applying migrations by calling Database.Migrate() during the application startup.

  • @SumayaAli-q2h
    @SumayaAli-q2h Год назад +2

    thank you for this useful tutorial .. you said there are 2 networks but you created just one network (Backend) . can you explain more about the second network Frontend ??

    • @CodingDroplets
      @CodingDroplets  Год назад +1

      Thank you for watching the tutorial! In this specific video, I used the concept of maintaining two networks as an example while discussing Docker networking. However, I want to inform you that in the next video of the series (which is already available in the playlist), I delve into the implementation of multiple network.
      Feel free to check out the next videos for a more comprehensive understanding of Docker networking with multiple networks.

  • @mohammadhaider8462
    @mohammadhaider8462 2 года назад +2

    Hi this video is very useful. can you please also use CICD pipelines using Azure DevOps and deploy it on Azure Container Registry and then on Kubernetes.

    • @CodingDroplets
      @CodingDroplets  2 года назад +1

      More videos are coming soon. Currently we are working on Kubernetes videos.
      Please follow the playlist: ruclips.net/p/PLzewa6pjbr3JQKhB_U_FiuYwQC70i-TyU

  • @huseyinxdrov7403
    @huseyinxdrov7403 Год назад +1

    soo nays
    👍

  • @guillermomazzari4983
    @guillermomazzari4983 2 года назад +1

    Thanks for this wonderful series, I have a doubt, when you have to choose the target OS (Linux or Windows) if you choose Linux, does it mean it only works on Linux OS? if I wanted to run on both, would I have to create two docker files?

    • @CodingDroplets
      @CodingDroplets  2 года назад +1

      It is just the OS for the container. Linux containers can run on windows machines as well. You can install docker in windows and run linux containers in it.

    • @guillermomazzari4983
      @guillermomazzari4983 2 года назад

      @@CodingDroplets Great, thanks! Im currently watching your blazor tutorial series, love it!

  • @flyboyt6218
    @flyboyt6218 6 месяцев назад +2

    Hi I’m a newbie straight out of college. How can I access the code to follow through this tutorial from start to finish. Are there any github links or any other ways around it

    • @CodingDroplets
      @CodingDroplets  6 месяцев назад

      Welcome to the coding world! You can access the source code for this tutorial on our GitHub repository here:
      github.com/codingdroplets/DemoMicroserviceSolution

  • @ЮліяСоломаха-г1щ
    @ЮліяСоломаха-г1щ 2 года назад +1

    Hi! thank you very much for your video! Very simple!
    Is it possible to make the data not be deleted from the database every time the application is launched?
    And is it possible to somehow enter data into the database without prescribing CRUD? I usually enter the data in the SqlServer itself, but I don't know how to do it with the docker container. Thank you!

    • @CodingDroplets
      @CodingDroplets  Год назад

      I apologize for missing your comment earlier, but I'm glad to see it now. Thank you for watching my video and for your kind words!
      To answer your questions, yes, it is possible to preserve data in the SQL Server database even after the application is relaunched. This can be achieved by using a named Docker volume to store the data persistently. In the docker-compose.yml file, you can add a named volume for the SQL Server container to mount as a data volume. This way, the data will persist even if the container is destroyed or recreated.
      As for entering data into the database without using CRUD operations, you can use a SQL client tool like SQL Server Management Studio to connect to the SQL Server container and execute SQL queries to insert data directly into the database.

  • @sanchairattanaumpa7192
    @sanchairattanaumpa7192 14 дней назад

    how to add button update ?

  • @nhatnguyenthanh7991
    @nhatnguyenthanh7991 Год назад +1

    Great Tutorial! I deployed application in docker containenr and connect them each other, But i cannot to run command dotnet ef migrations add createinitial to migration to database. Could you give me some recommend for this?

    • @CodingDroplets
      @CodingDroplets  Год назад +1

      Thank you for watching the tutorial and trying out the deployment in a Docker container.
      Regarding the issue you are facing with running the "dotnet ef migrations add createinitial" command, it seems like the Entity Framework tools are not installed in your container image. You will need to install the tools in your container by adding the following command in your Dockerfile:
      RUN dotnet tool install --global dotnet-ef
      Alternatively, you can install the tools locally on your host machine and run the command outside of the container, by specifying the connection string to the SQL Server container.
      I hope this helps! Let me know if you have any further questions or issues.

  • @necromanta2
    @necromanta2 9 месяцев назад

    I did as in tutorial, but after download from docker hub and compose up when i try load page i am getting no response error

  • @facuoubel
    @facuoubel 9 месяцев назад +1

    I couldn't find the microsoft sql server image in dockerhub :(

    • @CodingDroplets
      @CodingDroplets  9 месяцев назад +1

      hub.docker.com/_/microsoft-mssql-server

    • @facuoubel
      @facuoubel 9 месяцев назад

      ​@@CodingDroplets I have a problem with the docker-compose.yml file. When I configure the file and try to rebuild the application with Visual Studio Community, the application does not respond.

  • @zergzerg4844
    @zergzerg4844 Год назад +1

    Hello? For what purpose some people include nginx into assembly if blazer works without it?

    • @CodingDroplets
      @CodingDroplets  Год назад +1

      Hello! Including NGINX in a Docker container along with a Blazor app can serve various purposes, depending on the specific use case and requirements:
      - NGINX can act as a reverse proxy, forwarding incoming requests to the Blazor app. This can provide an additional layer of security and help to manage and optimize traffic between clients and your Blazor application.
      - If you have multiple instances of your Blazor app running in a cluster for scalability, NGINX can distribute incoming requests among these instances to balance the load and improve performance.
      - NGINX is efficient at serving static files (like CSS, JavaScript, and images). You can configure it to serve these files directly, relieving your Blazor app from handling such requests, which can improve performance.
      - NGINX can handle SSL termination, offloading the SSL/TLS encryption and decryption process, which can reduce the workload on your Blazor app and improve overall performance.
      - NGINX can be configured for caching, which can significantly speed up the delivery of content to users, especially for frequently requested resources.

    • @zergzerg4844
      @zergzerg4844 Год назад +2

      @@CodingDroplets Thanks a lot for your response, now I've got it.

    • @CodingDroplets
      @CodingDroplets  Год назад

      You are most Welcome!

  • @vishalpawarsblogs8077
    @vishalpawarsblogs8077 2 года назад +1

    how does table created in sql image? do we need to run migration first?

    • @CodingDroplets
      @CodingDroplets  2 года назад

      In the Database Context contructor, you can see an object named databaseCreator with which I'm creating database and tables.

  • @labibabdullah389
    @labibabdullah389 2 года назад +1

    Will you be able to make a video on deploying this app to heroku (using docker)?

    • @CodingDroplets
      @CodingDroplets  2 года назад +1

      More videos are coming soon. Will try to include that as well.
      Please follow the playlist: ruclips.net/p/PLzewa6pjbr3JQKhB_U_FiuYwQC70i-TyU

  • @gameportalhub
    @gameportalhub 6 месяцев назад +1

    Hi. I am press docker-compose on visual studio, api starting on localhost. Everything working fine. But when i take build to compose, it is starting but i am not access from it’s ip. How can i start my api an spesific ip and access to it.

    • @gameportalhub
      @gameportalhub 6 месяцев назад +1

      I am sorry. My mistake. I send request to api’s container ip. But when i use my device ip for request it respond.

    • @CodingDroplets
      @CodingDroplets  6 месяцев назад

      I'm glad you figured it out. It's common to run into such issues when working with Docker and network configurations.

  • @vishalpawarsblogs8077
    @vishalpawarsblogs8077 2 года назад

    Very useful tutorial. But I am curious to know In production environment , is it good idea to use sql server as docker container?
    How to handle sql db passwords for production if we use azure to host both app and db. Can you suggest way to deal with it? I am making POC on same so i stucked around it.

    • @CodingDroplets
      @CodingDroplets  2 года назад +1

      In production, the deployment will be much easier if you use docker.
      We just need to install docker in the host machine and no other installations needed. If you use docker compose, using a single command we can deploy the entire solution with database(s) and all other dependencies. This video is part of a series (link below). I suggest you to watch other videos as well for getting a proper understanding.
      ruclips.net/p/PLzewa6pjbr3JQKhB_U_FiuYwQC70i-TyU

  • @davidemmanuel3001
    @davidemmanuel3001 2 года назад +1

    great tutorial. Please can you share the code repo?

    • @CodingDroplets
      @CodingDroplets  2 года назад +1

      github.com/codingdroplets/DemoBlazorServerAppWithDockerCompose

  • @LoneLatinGuy74
    @LoneLatinGuy74 Год назад +1

    I think is a good series, but would you have the source code to download for the blazer project?

    • @CodingDroplets
      @CodingDroplets  Год назад

      Thank you for your positive feedback. I'm glad to hear that you found it helpful.
      Regarding your question, yes, all the source codes for the projects in the series, including the Blazor project, are available for download on my GitHub repository at github.com/codingdroplets

  • @khauvannam
    @khauvannam 8 месяцев назад +1

    Please help me, i stuck at error 40, i can accessable when using client like data grip or mssm, but when i send q request, it return server not accessable, ef core tool migration work fine...

    • @CodingDroplets
      @CodingDroplets  8 месяцев назад

      It sounds like there might be a network configuration issue. Error 40 usually indicates a network-related error, where the client can't reach the SQL Server. Make sure that your Docker container is running and that it's exposing the correct port. Also, ensure that the connection string in your application points to the correct address and port where SQL Server is running.

    • @khauvannam
      @khauvannam 8 месяцев назад

      @@CodingDroplets the error belong to my docker container of my endpoint, i dont know why it happened, sql server work fine

    • @khauvannam
      @khauvannam 8 месяцев назад

      @@CodingDroplets hello there,the method without ef core work fine but the method with efcore still return 40 error, i dont know why it happen? What i should check it because my connection string still work fine with ef core tool

    • @khauvannam
      @khauvannam 8 месяцев назад

      ​@@CodingDroplets hi dbname is the database name you created in sql server manager before?

    • @CodingDroplets
      @CodingDroplets  8 месяцев назад +1

      Kindly check the network is configured properly in docker-compose

  • @AccountZhykhor
    @AccountZhykhor Год назад +1

    IDK why but it starts really slow. Any tips how i can debug it or common tips how can i make it load faster?

    • @AccountZhykhor
      @AccountZhykhor Год назад

      I mean it builds fast (like 1-2sec) but browser starts in 4-5 minutes

    • @CodingDroplets
      @CodingDroplets  Год назад

      Please check your Docker host's resources (CPU, memory, etc.). If your host machine is running low on resources, it can impact the performance of your Docker containers.

    • @AccountZhykhor
      @AccountZhykhor Год назад

      @@CodingDroplets It has enough, takes around 0.5% of CPU and others 2% or smth like that

  • @paulsean5367
    @paulsean5367 10 месяцев назад +1

    Hello,
    Thanks. But can we have the github link also ?

    • @CodingDroplets
      @CodingDroplets  10 месяцев назад

      github.com/codingdroplets/DemoBlazorServerAppWithDockerCompose

    • @paulsean5367
      @paulsean5367 10 месяцев назад

      thanks
      @@CodingDroplets

  • @winstochurgle9133
    @winstochurgle9133 Год назад +1

    I can't get any succesful response from my web api. I'm getting this error: Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot authenticate using Kerberos. Ensure Kerberos has been initialized on the client with 'kinit' and a Service Principal Name has been registered for the SQL Server to allow Kerberos authentication. Any possible solution?

    • @winstochurgle9133
      @winstochurgle9133 Год назад +1

      After solving error above using "integrated security=false" statement have this error:
      Microsoft.Data.SqlClient.SqlException (0x80131904): Login failed for user 'sa'.
      at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)

    • @CodingDroplets
      @CodingDroplets  Год назад +2

      Thank you for reaching out and sharing the error message you're encountering. The error message indicates a login failure for the 'sa' user in the SQL Server database.
      To troubleshoot this issue, I recommend the following steps:
      Double-check the connection string in your application. Ensure that the username and password for the 'sa' user are correct. Make sure there are no typos or missing information in the connection string.
      Verify that the SQL Server instance is running and accessible. Ensure that the server name, port, and any necessary network configurations are accurate.
      Test the connection to the SQL Server database using a database management tool like SQL Server Management Studio. This can help verify if the issue is specific to the application or if it's a configuration problem on the database server.
      If you're still experiencing issues after following these steps, I encourage you to review the source code of the project. It may provide further insights into the configuration and setup. You can find the source code at the following GitHub repository: GitHub - codingdroplets/DemoBlazorServerAppWithDockerCompose.

  • @afonsocarvalho3124
    @afonsocarvalho3124 9 месяцев назад

    It worked for my web api, I can access the swagger from the docker mapped port. But it did not apply the migrations.

    • @minhnguyen-0524
      @minhnguyen-0524 8 месяцев назад

      you must connect ssms, then add database

  • @rafysancheztilogica8587
    @rafysancheztilogica8587 Год назад +1

    volumes ?

    • @CodingDroplets
      @CodingDroplets  Год назад

      Thank you for your question! In the tutorial video, we focused on containerizing a .NET Core app with an SQL Server database without explicitly discussing volumes. While volumes weren't covered in this particular video, they are indeed a crucial aspect of Docker.
      If you're interested in incorporating volumes into your Docker setup for data persistence, you can achieve this by modifying the docker-compose.yml file. Including volume definitions in the docker-compose.yml allows you to map paths on the host system to paths within the containers, thus ensuring data persistence even when containers are stopped or removed.

  • @pieceofcode_
    @pieceofcode_ 3 месяца назад +1

    System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.
    excuted below command too.
    dotnet dev-certs https --trust
    in localhost I'm trying to deploy in container

    • @CodingDroplets
      @CodingDroplets  3 месяца назад +1

      Thanks for your comment! It looks like the HTTPS setup in your container is causing issues. Running dotnet dev-certs https --trust only works on the host machine, not inside the container. You can try disabling HTTPS.

  • @spammedspammed4304
    @spammedspammed4304 5 месяцев назад +1

    Hi, I have uploaded my db on azure data studio. When I debug my .net project, I can connect to db easily that is containerized by docker. However, if I run my .net project with docker I can't seem to connect to the db. Both with the same networks I followed your compose.yml

    • @CodingDroplets
      @CodingDroplets  5 месяцев назад

      Thanks for the comment! It seems like the issue might be with the networking setup in Docker. Ensure both containers are on the same network and that your connection string points to the database container name instead of localhost. You can refer to the source code here for more details: github.com/codingdroplets/DemoBlazorServerAppWithDockerCompose