Use SSL Certificates for Dotnet Core Application in Docker Containers

Using SSL to secure incoming and outgoing traffic from your server is always recommended. When you are developing locally or testing on a server, whether it is Windows or Macintosh or some distribution of Linux like CentOS, fedora, Ubuntu etc, its easy to put the certificate in one of the local directories and then ask server to use the same. However this becomes a little bit different if you are using Containers. Since Docker is the most popular container technology, it has become almost synonymous with containers. When using containers, you can many choices:
1) Map a local volume containing certificate files to the container and then refer to it from inside container
2) Copy certificate directly inside Container during image build process and then refer to it Continue reading “Use SSL Certificates for Dotnet Core Application in Docker Containers”

Use OpenSSL to work with SSL Certificates, CSR and Private Keys

OpenSSL is a robust, commercial-grade, and full-featured toolkit on the Linux that can be used for a large variety of tasks related to Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general purpose cryptography library. It is licensed under an Apache-style license, which basically means that you are free to get and use it for commercial and non-commercial purposes subject to some simple license conditions.

It is already installed out of the box on the most linux distributions or available in the trusted package repositories. OpenSSL has been kind of standard in the open source domain to work with SSL and TLS protocols. If for some reason, it is not already installed, you can install it by using your distribution specific commands. Continue reading “Use OpenSSL to work with SSL Certificates, CSR and Private Keys”

Install dotnet core SDK and runtime on Ubuntu OS

.NET Core is the cross platform and open-source framework based on .NET framework.  It is maintained by both Microsoft and the community at on Github. In this blog post, we’ll learn to install dotnet core on the  Ubuntu. For the post’s purpose we’ll use Ubuntu 16.04 since that is latest LTS release from Ubuntu which has the support from almost all software vendors.

Register Microsoft key and feed

Before installing .NET, you’ll need to register the Microsoft key, register the product repository, and install required dependencies by running the following commands: Continue reading “Install dotnet core SDK and runtime on Ubuntu OS”

Using Path filters in Build definition in Azure DevOps / VSTS

Sometimes it happens that for the organization and maintenance purpose, you would like to keep all code related to one component of a product in one place only. Now that component may be complex component having multiple sub parts like API, UI, Database etc. Again, for the purpose of easy maintenance, you would like it all under one repository, which is not an bad idea. Now, imagine if you have different builds configured for different sub-components which are using this source code as their base and are configured to trigger on some event, say commit. Then for each small and big commit, it will trigger build in each of the configured builds. Ideally, if the change was related to only one sub-component say API, then you would need to trigger only API specific build and not the ones for the UI and/or Database.  Continue reading “Using Path filters in Build definition in Azure DevOps / VSTS”

Remove old docker images from Azure Container Registry

As part of the Continuous Integration process, new builds are generated which contains certain enhancements or modification or bugfixes. For a containerized application deployment, docker images are created as part of builds which then needs to be uploaded to one of the container registries. Over the time, the registry will get filled up. Also as one use more and more space on the container registry, one needs to pay more and more.

There are no inbuilt commands or utilities provided by Docker for this. You have to write complex scripts for doing it. Fortunately, in latest round of the Azure CLI update, Microsoft has added some commands to do this. However, it can be cumbersome to select and remove docker images one at a time.  Continue reading “Remove old docker images from Azure Container Registry”