Configure docker to start on boot on Linux

Most current Linux distributions (RHEL, CentOS, Fedora, Ubuntu 16.04 and higher) use systemd to manage which services start when the system boots. We can use below commands to configure docker to start on boot:

$ sudo systemctl enable docker

To disable this behavior, use disable instead.

$ sudo systemctl disable docker

If you are running on Ubuntu 14.04 LTS or lower, you can use upstart to help you with same:

$ echo manual | sudo tee /etc/init/docker.override

Install Docker on Ubuntu Server

Updated: 2019/07

As you might be already aware, Docker by Docker Inc is a widely used tool for containers. Containerization is an approach to software development in which an application and its versioned set of dependencies plus its environment configuration abstracted as deployment manifest files are packaged altogether (the container image), tested as a unit and finally deployed (the container or image instance) to the host Operating System (OS).

Containers isolate applications from each other on a shared operating system (OS). This approach standardizes application program delivery, allowing apps to run as Linux or Windows containers on top of the host OS (Linux or Windows). Read More »

Determine .NET Framework versions installed using PowerShell

Users can install and run multiple versions of the .NET Framework on their computers. When you develop or deploy your app, you might need to know which .NET Framework versions are installed on the user’s computer. Note that the .NET Framework consists of two main components, which are versioned separately:

  1. A set of assemblies, which are collections of types and resources that provide the functionality for your apps. The .NET Framework and assemblies share the same version number.
  2. The common language runtime (CLR), which manages and executes your app’s code. The CLR is identified by its own version number (see Versions and Dependencies).Read More »

Ignore self-signed certificates in PowerShell

When using windows PowerShell as REST client, you may encounter certificate invalid issues for various reasons. The most likely reason should be a self-signed certificate or a invalid common name certificate or sometimes not adding SAN names in the certificates. This may cause your script to break if it relies on fetching data from remote server when communicating on HTTPS.

To avoid SSL Certificate trust issues if using HTTPS, we can use below PowerShell function to help:Read More »

Using POST method in REST API in PowerShell

In one of previous blog post, we discussed how to work with using REST APIs in PowerShell. In this blog post, we’ll discuss how to use POST method in REST API.

POST involve sending both a body and headers.

  $person = @{
   $body = (ConvertTo-Json $person)
   $hdrs = @{}
   Invoke-RestMethod -Uri $url -Method Post -Body $body -ContentType 'application/json' -Headers $hdrs

The above on several lines is easier to read than one long line:Read More »

Debugging PowerShell in Visual Studio Code – Part 02

In this blog post, we’ll continue from where we left earlier in the previous post on debugging PowerShell using Visual Studio code. You may be beginning to notice that the debugging features offered in Visual Studio code are far ahead in terms of usability.

Not only that, we can set line breakpoints (which can be specified by pressing F9 on code line in reference), we can also set conditional breakpoints, functional breakpoints and trace breakpoints.

A functional breakpoint can be defined as breakpoint which is invoked on calling of a particular function. You can set a function breakpoint to break into the debugger not only on a particular function invocation but also on an alias, a built-in command, or application invocation. Read More »

Debugging PowerShell in Visual Studio Code – Part 01

In one of the previous post, we discussed how to use visual studio code for PowerShell development. Writing scripts in Visual Studio code is now more or less at par with ISE (Integrated scripting environment) and in a few cases, is more useful. However, you do need to be able to make sure that whatever code you have written in PowerShell, should be able to run as intended. Also, if its not working as intended, you should be able to debug and see where you went wrong. In this blog post, we’ll discuss how to use Visual Studio code for debugging. These features are provided by the PowerShell extension, or, more accurately, by the PowerShell Editor Services module which comes with the PowerShell extension. PowerShell Editor services not only provides language services to the Extension (which in turns provide services to Visual Studio code) but also provides useful debugging features.Read More »

Difference between URI, URL and URN

It has been my observation that many of the tech engineers do not know the difference between URI, URN and URLs. For many of them, they are same. For very of them, rest of them and few others are confused. So through this blog post, I intend to clarify that difference. I guess this is more of the classical questions like what to formally call a web address and what do you mean by a web address in first place. In this age of varying protocols and APIs and methods, what is called as a web address is itself of a question. for example, may serve entirely different content than which may further differ that (these urls are just for understanding purposes only).Read More »