tag:blogger.com,1999:blog-19555246662477264032024-03-02T15:49:01.934+05:30C# Guide - C#, Asp.Net, MVC, LINQ, jQuery and SharePoint ResourcesPrakash Bhttp://www.blogger.com/profile/11169179477023840638noreply@blogger.comBlogger1470110tag:blogger.com,1999:blog-1955524666247726403.post-20714692812671669982020-10-04T04:41:00.005+05:302020-10-04T04:41:54.837+05:30Docker in Azure<div dir="ltr" style="text-align: left;" trbidi="on">
<table class="siteindex"><tbody>
<tr><td><b>Docker in Azure</b>
<br />
<hr color="#E3B999" />
</td></tr>
<tr><td><ul>
<li><a href="http://csharp-guide.blogspot.com/2020/10/azure-cli.html" style="color: blue;">Azure CLI</a></li>
<li><a href="http://csharp-guide.blogspot.com/2020/10/what-is-azure-container-registry.html" style="color: blue;">What is Azure Container Registry</a></li>
<li><a href="http://csharp-guide.blogspot.com/2020/10/creating-azure-container-registry-acr.html" style="color: blue;">Creating an Azure Container Registry (ACR)</a></li>
<li><a href="http://csharp-guide.blogspot.com/2020/10/what-is-azure-container-instances.html" style="color: blue;">What is Azure Container Instances</a></li>
</ul>
</td></tr>
</tbody></table>
<br /></div>
Prakash Bhttp://www.blogger.com/profile/11169179477023840638noreply@blogger.com0tag:blogger.com,1999:blog-1955524666247726403.post-87215799475669430962020-10-04T04:38:00.006+05:302020-10-04T04:38:59.736+05:30What is Azure Container Instances<p><b>Azure Container Instances (ACI)</b>
allows us to deploy individual containers in Azure without having to provision
Virtual Machines.</p><p class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
It is kind of a serverless computing environment where we can deploy our
applications as Docker containers in Azure Container Instances. <span></span></p><a href="http://csharp-guide.blogspot.com/2020/10/what-is-azure-container-instances.html#more"></a>Prakash Bhttp://www.blogger.com/profile/11169179477023840638noreply@blogger.com0tag:blogger.com,1999:blog-1955524666247726403.post-27907419799987337922020-10-04T04:36:00.006+05:302020-10-04T04:36:46.369+05:30Creating an Azure Container Registry (ACR)<p> <span style="font-family: Calibri, sans-serif; font-size: 11pt;">We
can create an </span><b style="font-family: Calibri, sans-serif; font-size: 11pt;">Azure Container Registry</b><span style="font-family: Calibri, sans-serif; font-size: 11pt;">
(ACR) in different ways, using Azure CLI or Azure Portal or Powershell. In this
post, we shall see how to create an Azure Container Registry using Azure CLI. </span></p><span style="font-family: "Calibri",sans-serif; font-size: 11.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">
The first step in creating an <b>Azure
Container Registry (ACR)</b> using <b>Azure
CLI</b> is to log in to Azure CLI. Open a command prompt and enter the command.<span></span></span><a href="http://csharp-guide.blogspot.com/2020/10/creating-azure-container-registry-acr.html#more"></a>Prakash Bhttp://www.blogger.com/profile/11169179477023840638noreply@blogger.com0tag:blogger.com,1999:blog-1955524666247726403.post-90398067246356730362020-10-04T04:35:00.000+05:302020-10-04T04:35:05.008+05:30What is Azure Container Registry?<p> <b>Azure Container Registry</b> is
like a private <b>DockerHub in Azure</b>.
It is a managed p<b>rivate Docker registry
service</b> based on the open-source Docker Registry 2.0. Create and maintain
Azure container registries to store and manage your private Docker container
images and related artifacts.</p><p class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><o:p></o:p></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">We can configure to push the docker images into <b>Azure Container Registry</b>. Familiar tools such as Azure DevOps and
Jenkins <b>CI/CD pipeline</b> can be
configured to use Azure Container Registry as a build endpoint. <span></span></p><a href="http://csharp-guide.blogspot.com/2020/10/what-is-azure-container-registry.html#more"></a>Prakash Bhttp://www.blogger.com/profile/11169179477023840638noreply@blogger.com1tag:blogger.com,1999:blog-1955524666247726403.post-54713749301154253682020-10-04T04:32:00.005+05:302020-10-04T04:32:59.882+05:30Azure CLI<p> <b><span style="font-family: "Calibri",sans-serif; font-size: 11.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Azure CLI (Command-line Interface)</span></b><span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 107%;"> is a command-line tool for Manager azure
services. It's like Angular CLI, it provides various commands to manage Azure
services in an Account. Before we can start using Azure CLI we need to install
it, the latest version of Azure CLI can be installed from the following site.</span></p><span style="font-family: "Calibri",sans-serif; font-size: 11.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">
<span class="MsoHyperlink"><a href="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest">https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest</a></span><br>
<br>
Once Azure CLI is installed run the <b>az --version</b> command to make sure
that the installation was done successfully. <span></span></span><a href="http://csharp-guide.blogspot.com/2020/10/azure-cli.html#more"></a>Prakash Bhttp://www.blogger.com/profile/11169179477023840638noreply@blogger.com0tag:blogger.com,1999:blog-1955524666247726403.post-3248343776558684062020-10-01T08:46:00.001+05:302020-10-01T08:46:46.518+05:30Docker in Visual Studio<div dir="ltr" style="text-align: left;" trbidi="on">
<table class="siteindex"><tbody>
<tr><td><b>Docker in Visual Studio</b>
<br />
<hr color="#E3B999" />
</td></tr>
<tr><td><ul>
<li><a href="http://csharp-guide.blogspot.com/2020/09/create-dockerfile-and-container-using.html" style="color: blue;">Create Dockerfile and Container using Visual Studio</a></li>
<li><a href="http://csharp-guide.blogspot.com/2020/09/updating-dockerfile-and-rebuilding.html" style="color: blue;">Updating Dockerfile and rebuilding images using VisualStudio</a></li>
<li><a href="http://csharp-guide.blogspot.com/2020/10/creating-executable-from-net-core.html" style="color: blue;">Creating Executable from .Net Core Application</a></li>
<li><a href="http://csharp-guide.blogspot.com/2020/10/create-docker-image-with-net-core.html" style="color: blue;">Create Docker Image with .Net Core executable</a></li>
</ul>
</td></tr>
</tbody></table>
<br /></div>Prakash Bhttp://www.blogger.com/profile/11169179477023840638noreply@blogger.com0tag:blogger.com,1999:blog-1955524666247726403.post-33474285179255751432020-10-01T08:41:00.006+05:302020-10-01T08:41:58.361+05:30Create Docker Image with .Net Core executable<p> In the previous post we saw how to create an <b>Executable</b> (.exe file) for a .Net Core console application. In this
post we shall see how to package this .exe into a <b>Docker</b> image and deploy it as a Docker Container. </p><p class="MsoNormal">
First we will have to create a <b style="mso-bidi-font-weight: normal;">Dockerfile</b>,
we will create this file in the publish folder where the publish results (.exe
files) are created.<span style="mso-spacerun: yes;"> </span></p><span></span><a href="http://csharp-guide.blogspot.com/2020/10/create-docker-image-with-net-core.html#more"></a>Prakash Bhttp://www.blogger.com/profile/11169179477023840638noreply@blogger.com0tag:blogger.com,1999:blog-1955524666247726403.post-68199637745713533512020-10-01T08:26:00.002+05:302020-10-01T08:26:13.378+05:30Creating Executable from .Net Core Application.Net Core applications by default will create .dll executables, in this post we shall see how to explicitly create a .exe using .Net Core, in the next post we will see how to use this .Exe and create a Docker image. <div>Let’s start by creating a .Net Core Console App using Visual Studio.<span></span></div><a href="http://csharp-guide.blogspot.com/2020/10/creating-executable-from-net-core.html#more"></a>Prakash Bhttp://www.blogger.com/profile/11169179477023840638noreply@blogger.com1tag:blogger.com,1999:blog-1955524666247726403.post-32628022317907198442020-09-28T02:11:00.004+05:302020-09-28T02:11:23.425+05:30Updating Dockerfile and rebuilding images using VisualStudio<p> In the previous post we
saw on how to create a .Net Core console App and use Visual Studio to
automatically add <b>Dockerfile</b> to the
project. In this post, we will see how to change the Dockerfile created by
Visual Studio and rebuild the Docker image with the modified file.</p><p class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
Once the <b>Dockerfile</b> is created we
can manually exit the Docker file Add/Modify steps and rebuild the <b>Docker image.</b><br>
<br>
In this sample, we will add proxy settings to enable package restore in a
Corporate firewall environment.</p><span></span><a href="http://csharp-guide.blogspot.com/2020/09/updating-dockerfile-and-rebuilding.html#more"></a>Prakash Bhttp://www.blogger.com/profile/11169179477023840638noreply@blogger.com0tag:blogger.com,1999:blog-1955524666247726403.post-29129803027522395922020-09-28T02:07:00.000+05:302020-09-28T02:07:05.651+05:30Create Dockerfile and Container using Visual Studio<p> <b><span style="font-family: "Calibri",sans-serif; font-size: 11.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Visual Studio</span></b><span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 107%;"> provides an option to automatically add Docker
support. Using Visual Studio we can add the <b>Dockerfile</b> to a project without having to manually create one.
Visual Studio will create the Dockerfile with the commands pre-populated based
on the type of project, we create. </span></p><span style="font-family: "Calibri",sans-serif; font-size: 11.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">
In this post, we will create a Console application using <b>.Net Core</b> and use <b>Visual
Studio</b> to automatically create the Dockerfile for the Project. First, let us
create the following Console application.<span></span></span><a href="http://csharp-guide.blogspot.com/2020/09/create-dockerfile-and-container-using.html#more"></a>Prakash Bhttp://www.blogger.com/profile/11169179477023840638noreply@blogger.com0