Showing posts with label Docker Images. Show all posts
Showing posts with label Docker Images. Show all posts

Thursday, October 1, 2020

Create Docker Image with .Net Core executable

 In the previous post we saw how to create an Executable (.exe file)  for a .Net Core console application. In this post we shall see how to package this .exe into a Docker image and deploy it as a Docker Container. 

First we will have to create a Dockerfile, we will create this file in the publish folder where the publish results (.exe files) are created.    

Creating 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. 
Let’s start by creating a .Net Core Console App using Visual Studio.

Monday, September 28, 2020

Create Dockerfile and Container using Visual Studio

 Visual Studio provides an option to automatically add Docker support. Using Visual Studio we can add the Dockerfile 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. 

In this post, we will create a Console application using .Net Core and use Visual Studio to automatically create the Dockerfile for the Project. First, let us create the following Console application.

Docker Getting Started

Friday, September 25, 2020

Building an ASP.Net Core Web App Docker image

 In this post we shall see how to create a basic Asp.Net core Hello World App and package it into a Docker image. We will deploy the image as a Docker container and execute the Asp.Net Core application from Docker.

First let us start by creating an Asp.Net Core application using Visual Studio 2019

Building a Node App Docker image

 In the previous post we saw how to build a HelloWorld Docker image, in this post we will create a Docker image for a Node.js application.

First let us create a basic Node server using Express which will respond with a Greeting message in the root path (/).

Building a HelloWorld Docker images

 We have seen how to pull a Docker image from DockerHub and run in, now we will see how to create our own Docker image, build and run it.

The first step to create a Docker image is to create a Dockerfile.
Dockerfiles is a text file that contains instructions and steps to create a new Docker image.

A Dockerfile has no extension. If you are using docker on windows use notepad to create a dockerfile while saving select "All type" and save the file name as "Dockerfile".

Friday, September 18, 2020

Listing and Removing Docker Images

In the previous post we saw on how to pull and run Docker Images from a remote repository. Once we pull a Docker Image, it gets stored in the local repository. We can use the image ls command to view the list of images in the local repository.

Pulling Docker Images

In the previous post we executed the docker run command and noticed that the Docker Engine automatically pulled the hello-world image from DockerHub. We can also use the docker pull command to explicitly pull Docker images from the remote repository (DockerHub) to our local DockerRepository.

To pull images from the remote repository to the local repository we need to use the docker pull command as follows.

Sunday, September 6, 2020

What is a Docker Image?

 A Docker Image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries, and settings. A Container image is a static template version of a Docker Container, it is stored in the Docker registry. 

Container images become containers at runtime and in the case of Docker containers - images become containers when they run on Docker Engine.

When we execute the $ docker run command the container image is fetched from the registry and loaded in the Docker Daemon server to make it a live executing container.

Thursday, September 3, 2020

What is Docker?

Docker is an open platform to create, deploy and run applications by using Containers. Docker makes is easy to deploy applications from one environment to another. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and deploy it as one package.

Docker can be seen as an improvement to a Virtual machine. Each Virtual Machine in a server needs a separate Guest operating system to function. All the Docker Containers in a server use the same underlying Operating System of the server, hence Dockers are lightweight when compared to Virtual Machines. Also, Dockers are faster to spin up and execute when compared to Virtual Machines.

The Docker platform contains the following components