Role of Docker in Publishing .NET Applications to Red Hat Linux/OpenShift 3 Cloud PaaS.


Red Hat OpenShift 3 is a great technology that uses Docker Container and Kubernetes. The OpenShift 3 has evolved and gained a very good momentum since its launch in 2015. It uses a Git Repository to store the application source code and Docker registry to manage Docker Images.

Role of Docker in Click2Cloud’s Visual Studio 2015 DevOps Extension for OpenShift 3


What is Docker?

Docker is software which lets you create an image (which is a lot like a template for a virtual machine) and then run instances of that image in a container.

Docker¬†maintains a vast repository of images, called the¬†Docker¬†Hub,¬†which you can use as starting points or as free storage for your own images. You can install¬†Docker, choose an image you’d like to use, then run an instance of it in a container.


How to Install Docker?


You can refer the installation guide to choose your platform,

Use this command:

docker run -it centos 

After some processing, you’ll see a prompt like this:


Try few other commands and then exit the container:

root@719059da250d:/# lsb_release -a 

No LSB modules are available. 

Distributor ID:    Centos 

Description:    Centos 6.6

Release:    7.0 

Codename:    trusty 

root@719059da250d:/# exit


With above commands, you will see is the bash shell of an isolated container running Centos, on your machine.

Here’s a diagram and a breakdown of what is the result of this Docker installation:

Install Docker Server with CentOs


  1. First, we issue a dockercommand:

docker: run the dockerclient

run: the command to run a new container

-it: option to give the container an interactive terminal

centos: the image to base the container on

  1. Then the docker service runs on the host (i.e. our machine) to check if we have a copy of the requested image locally
  2. Then the¬†docker¬†service check the public registry (the¬†docker¬†hub) to see if there’s an image named¬†Centos available- which there is.
  3. The docker service downloads the image and stores it in its local cache of images (ready for next time).
  4. The docker service creates a new container, based on the centos


Accessibility constraints with Docker

Red Hat OpenShift 3 has adopted Docker Commands which are accessible via a OpenShift Web Console and Command Line Tools and Interfaces. But, managing these tools and remembering the various commands using CLI’s need good expertise and training, which making it difficult for developers to use it.


The best solutions

The best solutions that address these constraints ‚ÄúClick2Cloud‚Äôs OpenShift 3, Docker Container and Kubernetes based Dev-Ops Extension for Microsoft Visual Studio 2015‚ÄĚ

You can publish ASP.NET Application to Linux in 5 minutes with Docker Container and Kubernetes based DevOps Visual Studio 2015 Extension.

The One-Click-Solution from Click2Cloud allow developers to connect your various OpenShift 3 environments and deploy the applications in less than 3 seconds. This extension uses the Docker Hub to Pull & Push the Docker images and build the application.

5 Step Installation of Click2Cloud Extension and .NET Application Deployment

Step 1 ‚Äď Download and Install the extension from the Microsoft Visual Studio Gallery

Docker OpenShift 3 Extension for Visual Studio


Step 2 ‚Äď Launch the extension and Sing-in to OpenShift 3 environment

Docker OpenShift 3 Extension for Visual Studio - Launch Screen


Step 3 ‚Äď Create Project, .Net application from custom templates or open existing project

Docker OpenShift 3 Extension for Visual Studio - Create Project


Step 4 – View Webhook URL for the newly created application or for a running one and trigger a new build by sending a request to OpenShift API endpoint.

Docker OpenShift 3 Extension for Visual Studio - Copy Webhook URL


Step 5 ‚Äď View Pod, Build Logs from OpenShift 3 and Start Build

Docker OpenShift 3 Extension for Visual Studio - View Build Log


Please Note: Users can use Click2Cloud’s ASP.NET 5.0 Docker builder image to create a .NET based application in OpenShift 3.



What is Docker Explorer?

The ‚ÄėDocker Explorer‚Äô is a feature developed by Click2Cloud for its ‚ÄėVisual Studio 2015 Extension that provides developer various functionalities within the Visual Studio IDE;

  • Searching of Docker Images on the fly from Docker Hub in Single Click

A search is performed only on the official Docker registry. If a user needs to download an image from a private registry, then the full specification of the image, including registry, needs to be made manually in the initial Wizard text box.

Docker OpenShift 3 Extension for Visual Studio - Pull Docker Image

  • Port forwarding
  • Running Containers on Local Host
  • Managing containers; Start, Stop, Restart, Kill Containers
  • Pulling Docker Images on the local Docker Server
  • Running Docker Images
  • Pushing Local Docker Images on Docker Hub
  • Build Own Docker Images and Pushing to Docker Hub

Building an Image takes an existing Image and modifies it to create a new Image. Typically, this involves installing new packages. The specification of the new Docker Image is done via a special file which is always named: “Dockerfile”. Clicking on the Build Image icon starts the Build Image Wizard:

Docker OpenShift 3 Extension for Visual Studio - Build Docker Image

Docker Explorer View

Docker OpenShift 3 Extension for Visual Studio - Docker Explorer


So, go ahead and deploy this Extension from Microsoft Visual Studio Gallery

If you face any issue, please feel free to contact us @  or ring at +1 425 749 7495. We have a dedicated support team ready to help you.


To close on this note, we would like to discuss about Orchestration method used in the OpenShift 3 that is based on the Kubernetes technology. The Other Blog will give you more details.


You may also be interested in reading;

Red Hat‚Äôs (Chris Morgen ‚Äď Product Management Director) blogs explaining OpenShift2 and .Net integration;

And trying your hands on extensions at Microsoft Visual Studio Extension Gallery

Leave a Reply