Docker .Net Core - Docker Blazor Webassembly [.Net Docker Tutorial]

Описание к видео Docker .Net Core - Docker Blazor Webassembly [.Net Docker Tutorial]

Microservice Architecture Playlist: Microservices Tutorial Playlist Link:    • What are Microservices? - Microservic...  

This is .Net Core Docker Tutorial [.Net Docker Tutorial] that explains how to containerize .Net applications. Visual Studio provides the options to easily develop applications with Docker Support, Debug with Docker [Docker .Net Core Debug], and Deploy the Docker Container [Deploy .Net Core to Docker].

Docker .Net Core:
.NET Core can easily run in a Docker container. Containers provide a lightweight way to isolate your application from the rest of the host system, sharing just the kernel, and using resources given to your application. Learn how to use docker for .Net Core and deploy .Net Core to Docker.
Containers have many features and benefits, such as being an immutable infrastructure, providing a portable architecture, and enabling scalability.

DotNet Core Docker Example - Topics Covered in this Video are:
1. Adding a dockerfile to a new or existing .Net project [.Net Docker Support]
2. Publishing the docker image of .Net application to public repository of Docker Hub and running that docker image in a different machine.
3. Publishing the .Net docker image to a private repository and running it in a different machine [Docker Blazor Webassembly]
4. Sharing the .Net docker image locally without using any repositories.

Dockerfile
A Dockerfile is a file that defines a set of instructions that creates an image. Each instruction in the Dockerfile creates a layer in the image. For the most part, when you rebuild the image, only the layers that have changed are rebuilt. The Dockerfile can be distributed to others and allows them to recreate a new image in the same manner you created it. While this allows you to distribute the instructions on how to create the image, the main way to distribute your image is to publish it to a registry.

.NET Core images
Official .NET Core Docker images are published to the Microsoft Container Registry (MCR) and are discoverable at the Microsoft .NET Core Docker Hub repository. Each repository contains images for different combinations of the .NET (SDK or Runtime) and OS that you can use.
Microsoft provides images that are tailored for specific scenarios. For example, the ASP.NET Core repository provides images that are built for running ASP.NET Core apps in production.

The tools included in Visual Studio for developing with Docker containers [.Net Core Docker Container] are easy to use, and greatly simplify building, debugging, and deployment for containerized applications. You can work with a container for a single project, or use container orchestration with Docker Compose or Service Fabric to work with multiple services in containers.

Docker support in Visual Studio:
Docker support is available for ASP.NET projects, ASP.NET Core projects, and .NET Core and .NET Framework console projects.

The support for Docker in Visual Studio has changed over a number of releases in response to customer needs. There are two levels of Docker support you can add to a project, and the supported options vary by the type of project and the version of Visual Studio. With some supported project types, if you just want a container for a single project, without using orchestration, you can do that by adding Docker support. The next level is container orchestration support, which adds appropriate support files for the particular orchestrator you choose.

With Visual Studio 2022, you can use Docker Compose or Service Fabric as container orchestration services.
The Containers window is available, which lets you view running containers, browse available images, view environment variables, logs, and port mappings, inspect the filesystem, attach a debugger, or open a terminal window inside the container environment.

Adding Docker support for a .Net Project [Blazor Docker]:
You can enable Docker support during project creation by selecting Enable Docker Support when creating a new project.
You can add Docker support to an existing project by selecting Add - Docker Support in Solution Explorer. The Add - Docker Support and Add - Container Orchestrator Support commands are located on the right-click menu (or context menu) of the project node for an ASP.NET Core project in Solution Explorer.

Video Chapters:
0:00 - Video Summary
1:12 - Adding Docker Support in .Net Project
3:52 - Publish to Public Repository
7:27 - Pull from Public Repository
9:17 - Push to Private Repository
11:22 - Pull from Private Repository
12:45 - Save Docker Image
14:44 - Load Docker Image

#CodingDroplets #Docker #Microservices

Комментарии

Информация по комментариям в разработке