Deploy a .NET Core API with Docker (Step-by-Step)



In this video we build & package a .NET Core API as a Docker image, then deploy and spin that image up as Container on Windows, Linux and Azure hosts.

We do this completely step by step with no skipping.

– My Book: https://www.apress.com/gp/book/9781484262542
– Patreon Site (Exclusive Member Benefits!): https://www.patreon.com/binarythistle

A companion article, (including all links to all the mentioned references and articles), can be found at:

https://dotnetplaybook.com/

source

27 thoughts on “Deploy a .NET Core API with Docker (Step-by-Step)”
  1. That was great, thank you. Now can anybody show me how to host it for free* without Azure ?

  2. Thank you very much. Could you please tell me. What if there is, for example, another class library project in the current solution, and the existing application refers to models in it. What to do? Do I need to make a COPY of the auxiliary project in /src? Or will it link to it by itself? If yes, then how can I write path to this common.csproj, because it is not in docker file context. Thanks

  3. How do you do deploy to a localmachine with a docker-compose consisting of an api and an sql database?
    It skips the database if I push it to dockerhub.

  4. in line no 17 of docker file why the copy command has . instead of ./ what is the difference (COPY –from=build-env /app/out .)

  5. Hi @les I am used to watch your knowledge share videos…could you just let me know how would i access key vault in local docker in order to debug application

  6. Hi, I manage to run image but my connection string link to sql server on my pc localhost. My image is not able to connect sql and fetch data.

  7. An amazing video. The organic background and conversational tone just makes it fel like i am talking to a fellow dev not some youtube channel. Amazing work. I have a good grip of the power of docker now.

  8. Hi ​ @Les Jackson ,

    Few things

    1. When you're using VS Code for demo pls don't use the dark theme as it gets really hard to understand the code or the commands. I recommend you should be using the white theme.

    2. When you're navigating between the files or folder make sure you're resolution is proper or everything is zoomed properly because while watching the video I can hardly read any of the code u were typing.

  9. This was really great and easy to anyone wants to learn this Thank you
    Images is like a class and containers are the objects really cool 👌
    could you have a viedo on how to automate this project?

  10. Hi Les, love your videos! I followed the REST Api on .Net Core 3.1 (Commander API) , and then tried to deploy it using this video but it's not working for me. I tried different ports to see if that was the issue but I'm getting a SQL error now saying it can't connect to the db 🙁

  11. in my case when i write
    docker build .
    i got this error "error checking context: 'syntax error in pattern'."

  12. anyone knows how to include the nuget packages? The Internet says i have to copy the nuget file anywhere. But idk where and also idk what commands i need also put in the container file.

  13. I really loved this , I learnt from this video and managed to Deploy .NET Core 5.0 API with docker and do this same in linux and use this API in windows and Mac

  14. Wow, this is very easy, thank you for the video. I don't have any experience in backend deployment, so my question is how secure is this?
    And what are the practices to make sure that the backend is secure?

Leave a Reply

Your email address will not be published.

Captcha loading...