What is Docker, Containers and why are they smart for your business?

Reading time 9 minutes

Scalability, accessible and easy to install with Automize

”That’s funny, the code runs fine on my system”

“We cannot test this new feature, since it would require major changes to our code and production infrastructure”

“It’s hard to collaborate and introduce new developers to the workflow since the codebase has grown so big”

“The new changes to our application, requires an upfront cost of 250.000 $ in new servers, licensing etc. and will take 3 months before the platform is ready”

Imagine having an infrastructure with its web apps, databases, networking components, operating system, runtime libraries and all that other stuff that makes up your application. Imagine having to scale that for your upcoming big sales event, or those 100.000 new users who just signed up for your product.

Now image being able to have that running like you were just installing Spotify on your computer. Next, Next and finish and you’re good to go.

Sounds neat, doesn’t it?

A brief history on traditional on-premises deployment and it’s horrors

So back in the ol’ days, when you wanted to deploy a new application, you first had to estimate what amount of resources you need for your application. If you CapEx model (Capital investment) was incorrectly calculated, you may need to invest in new servers and network equipment.

Then you get the infrastructure guys to physically setup the new servers, install the underlying hypervisor, add them to your server-farm, configure networking, install operating systems, pwatch them, create databases, configure backup and monitoring and THEN you could begin the work of developing and deploying the application.

Months pass, but you’re finally ready to go live. All seems well, but your helpdesk is suddenly being bombarded.

The new solution cannot scale to the thousands of new users. Being a monolithic application, it wasn’t designed to being able to scale compute, database, and the network load. A few weeks later you have another issue, something is broken. Your team does know what’s causing it. Hours upon hours of troubleshooting and you find the root cause to be an update to some libraries on the servers. It wasn’t tested since your system lacked and identical test environment which isn’t available. You team couldn’t easily find the culprint, since there is no version control, and the updates had to be manually uninstalled on the servers, requiring downtime.

The nature of the monolithic design found in traditional on-premises bare metal or virtualization, limits organization’s ability to do independent deployment of new features, scale their solution and make correct fault isolation. It also limits the technologies they can use.

Virtual machines have helped us overcome problems regarding keeping legacy applications alive, reducing cost, and improving our agility, but as the world and our demand keeps moving faster, so must the technology that we use.

What is Docker? How does it work?

Docker is the next evolution in virtualization technology, and is a gamechanger in how organization can develop, deploy, and scale their applications.

Normally you would have a virtual machine with its own separate operating system and dependencies.

Every component of your application would ideally require their own virtual machine, making management, deployment, and changes cumbersome.

In contrast, a single docker host can run several instances of the same or a different application.

It does so by taking the virtualization on step closer to the application, by letting them share the same operating system and kernel, but still allowing for independent configuration and isolation just as a virtual machine would allow.

This allows a single node to host more applications, since we can cut away the extra copies of the operating system. It also removes and dependency layers.

In short, we are not doing hardware virtualization, but operating system virtualization..

In addition, docker does not require the manual installation of libraries and software like it would in a virtual machine. Since the underlying platform always is the same, the developers can package all their software requirements in a so-called docker Image (much like an application).

A Docker image contains all the necessary software dependencies, configuration files, libraries and runtime components and code that your application would need. Does your application need a specific .NET version? No need to install it in the operating system, just add it to the image.

See it as an .MSI file on steroids.

When it’s time to run the application, the docker host simply downloads the latest version of your image from a so-called repository. That way if a developer makes changes to the application, it’s just a simple matter of restarting the container and let the automatically download the latest version. Doing it this way also introduces version control for easier rollback.

Docker Containers is unlike a traditional setup, stateless. That means that no docker container should contain persistent data. You effectively separate your so-called storage from your compute components.

In short, docker enables you to separate your applications from your infrastructure, making it possible to move your application wherever you like it to be running.

The benefits of Docker and Microservices

Docker has several benefits including:

  • Faster and more predictable development and deployment – Developers can make the app on their own computer, knowing that it will run the same in production.
  • Allows for separation of code components, making it easier to onboard new developers and introduce new functions.
  • Allows for a so-called CI/CD pipeline, making it possible to have almost identical to production test environments, easier collaboration, and version control.
  • More lightweight than a virtual machine.
  • Allows for much easier scaling of your application and the ability to run it anywhere.
  • Release more time for your developers and infrastructure personnel.

How Docker can make deployments faster using Jira as an example

So, suppose we are a developer who needs to create a new plugin for Atlassian Jira.

Jira Software is part of a family of products designed to help teams of all types manage work. Originally, Jira was designed as a bug and issue tracker. But today, Jira has evolved into a powerful work management tool for all kinds of use cases, from requirements and test case management to agile software development.

Though Jira is optimized for the cloud and has ready-to-go Azure marketplace images, we will in this step demonstrate a traditional on-premise dev environment, and then go through that same process, but using Docker instead.

Using a Virtual Machine

On our computer we’ll start by configure our Hyper-V hypervisor (Hyper-V allows us to run a virtual computer inside our computer. This is called virtualization, and is also used by Docker)

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All

After a reboot, we need to download and install a Linux operating system. We also need to ensure that our operating system is supported according to the documentation.

$URL = "https://releases.ubuntu.com/20.04.5/ubuntu-20.04.5-live-server-amd64.iso?_
Invoke-WebRequest $URL -OutFile C:\Temp\Ubuntu.iso

After that, we may go ahead and create the virtual machine:

New-VM -Name Jira -MemoryStartupBytes 4GB -NewVHDPath C:\temp\Jira.vhdx
-NewVHDSizeBytes 40G

We will need to go through the entire operating system installation:

Once the install is complete, we need to update our operating system:

automize@jira:~$ sudo apt-get update

Let’s install the MySQL server:

automize@jira:~$ sudo apt install mysql-server

And start it:

automize@jira:~$ sudo systemctl start mysql.service

And configure it …:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password
BY 'password';
automize@jira:~$ mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
automize@jira:~$ mysql -u root -p
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH auth socket;
automize@jira:~$ sudo mysql_secure_installation
mysql> CREATE USER 'automize' @'localhost' IDENTIFIED WITH authentication_plugin BY
ERROR 1524 (HY000): Plugin 'authentication plugin' is not loaded

Try upgrading the MySQL

automize@jira:~$ mysql_upgrade -u root -p
The mysql_upgrade client is now deprecated. The actions executed by the upgrade
client are now done by the server.
To upgrade, please start the new MySQL binary with the older data directory.
Repairing user tables is done automatically. Restart is not required after
upgrade. The upgrade process automatically starts on running a new MySQL binary
with an older data directory. To avoid accidental upgrades, please use the
--upgrade=NONE option with the MySQL binary. The option --upgrade=FORCE is also
provided to run the server upgrade sequence on demand.
It may be possible that the server upgrade fails due to a number of reasons. In
that case, the upgrade sequence will run again during the next MySQL server start.
If the server upgrade fails repeatedly, the server can be started with the
upgrade=MINIMAL option to start the server without executing the upgrade sequence,
thus allowing users to manually rectify the problem.

Debug for a couple of more minutes before deciding to spin up an Azure SQL DB instead …

# Set variables for your server and database
$resourceGroupName = "myResourceGroup"
$location = "eastus"
$adminLogin = "azureuser"
$password = ""
$serverName = "mysqlserver-$(Get-Random)"
$databaseName = "mySampleDatabase"

# The ip address range that you want to allow to access your server
$startIp = ""
$endIp = ""

# Show randomized variables
Write-host "Resource group name is" $resourceGroupName
Write-host "Server name is" $serverName

Write-host "Creating resource group…"
$resourceGroup = New-AzResourceGroup -Name $resourceGroupName -Location
$location -Tag @{Owner="SQLDB-Samples"}

Write-host "Creating primary server…"
$server = New-AzSqlServer -ResourceGroupName $resourceGroupName -ServerName $serverName
-Location $location -SqlAdministratorCredentials $(New-Object -TypeName System.Management. Automation.PSCredential
-ArgumentList $adminLogin, $(ConvertTo-SecureString -String $password
-AsPlainText -Force))
Write-host "Configuring server firewall rule…"

$serverFirewallRule = New-AzSqlServerFirewallRule -ResourceGroupName
$resourceGroupName -ServerName $serverName
-FirewallRuleName "AllowedIPs" -StartIpAddress $startIp -EndIpAddress $endIp

Write-host "Creating a gen5 2 vCore serverless database…"
$database = New-AzSqlDatabase -ResourceGroupName $resourceGroupName -ServerName $serverName
-DatabaseName $databaseName -Edition GeneralPurpose
-ComputeModel Serverless -ComputeGeneration Gen5
-VCore 2 -MinimumCapacity 2
-SampleName "AdventureWorksLT"

Download Jira Core and install it, making the files executable beforehand. But before that, download Chrome, because a bug stops us from downloading the Linux build using Firefox:

Select and download the package for Linux:

automize@jira:~/Downloads$ chmod a+x atlassian-jira-core-9.3.0-x64.bin

automize@jira:~/Downloads$ sudo ./atlassian-jira-core-9.3.0-x64.bin
[sudo] password for automize:
Unpacking JRE …
Starting Installer …
This will install Jira Core 9.3.0 on your computer.
OK [o, Enter], Cancel [c]

Installation of Jira Core 9.3.0 is complete
Your installation of Jira Core 9.3.0 is now ready and can be accessed
via your browser.
Jira Core 9.3.0 can be accessed at http://localhost:8080
Finishing installation …

Try accessing Jira to no prevail:

Download an older Jira build and install that, because it’s probably a bug with the latest version, in conjunction with the used Ubuntu version. When done, access the web interface and configure it:

Configure your database:

This is the part where Jira should load, but as you can see, it’s simply crashes…

Alright enough of that, let’s do the same using Docker for Desktop.

Using Docker

Install docker:

Create a Volume for Jira and the pull the image:

We can now access the same configuration screen from our local browser instead of inside of our virtual machine:

For good measure, we’ve gone ahead and created a new SQL DB for this instance, and connected that:

And now Jira is starting:

The strength of docker and it’s place in Microsoft Azure

As you could see, the process for getting a Jira development environment up and running was significantly faster and easier, than doing it using traditional Virtual Machines.

Using Docker, the developer can be assured that the application will work the same way in production. While it’s great to being able to develop the app locally, when it comes to hosting and manage the security, Azure got your back.

When ready for production, organization can deploy containers to Azure using a range of products that best fit their needs for scaling, cost and security. Whenever it’s running Web optimized containers using Azure App Service Plans, general containers using Azure Container Apps, or large globally spanning enterprise applications using Azure Kubernetes Service, or any of the 7 options, Microsoft Azure is the place to go.

Microsoft Azure also integrates its market leading security, providing Roles Based Access Control and Microsoft Defender for Containers.

Using Docker, organizations can begin to utilize CI/ CD pipelines using Azure DevOps Services, thus improving time to production using Azure Pipelines, storing docker images and code in Azure Repos & Azure Container Registry, and better collaborate using Azure Boards.

Automize can help you on your DevOps / container journey

Creating a new application based on docker containers or transitioning from a traditional N-tier app to microservices requires hard work and thought. Not all businesses and applications are created equal, and while in some scenarios it’s a no brainer to adopt a DevOps and Microservices culture, for others simply just replacing some parts of their legacy components is sufficient.

Containers are the building blocks of the future. Just as virtual machines were when they were introduced. They are not just some “shiny new bright buzzword” but are here to stay just as the cloud.

From delivering applications more quickly, to decrease time from development to deployment, to reducing infrastructure and cost, containers provide both small and large organizations with real business value.

At Automize, we are always ready to help you and your company solve your challenges with Docker, we have our skilled consultants who are ready to implement a solution that is tailored to your needs and your company, you can contact us here to hear more about how we can help your business. 

About Automize

Automize was founded with the desire to create value by driving the digitization and transformation journey that all companies are on today. We do this by bringing people, business and technology closer together. Our starting point is the individual person, because without people there is no business, and technology is needed to run the business.

Visit Automize's website |
Cotact us|
Book a meeting with us

"Docker is the next evolution in virtualization technology, and is a gamechanger in how organization can develop, deploy, and scale their applications.” |

"A Docker image contains all the necessary software dependencies, configuration files, libraries and runtime components and code that your application would need. Does your application need a specific .NET version? No need to install it in the operating system, just add it to the image." |

"Using Docker, organizations can begin to utilize CI/ CD pipelines using Azure DevOps Services, thus improving time to production using Azure Pipelines, storing docker images and code in Azure Repos & Azure Container Registry, and better collaborate using Azure Boards." |


Want to know more?

You can always follow us on social media, where we regularly send updates, news and events.

If you are interested in hearing from us, you are very welcome to contact us by email or phone. You can also use our contact form

Automize was founded in 2015, with a wish to provide value by driving the journey of digitalization and transformation, which all companies are presently on. We accomplish that by bringing people, business and technology closer together.
© Automize 2023 | All rights reserved
magnifiercross linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram