How To,Tutorial,Wintellect Blogs

Multi-Stage Builds with Docker

Blaize Stewart

19 May , 2017  

Dockerfile

One of the most anticipated announcements in the Docker space when it comes to building images is Multi-Stage builds because of the huge benefits it gives to CI/CD pipelines in DevOps. Before this announcement, building software in a container usually involved creating a container with all the SDK’s and compilers in the container, uploading code into the container, compiling it, creating a drop, then building another container with just the runtime that sucks in the compiled code to run. This pattern required an external tool and storage to build the container image so it was more burdensome.

Multi-Stage builds on Docker though provide a mechanism for moving the output of a build from a builder container into another container that can be used for running. Consider the following the example. This Dockerfile builds a .NET core app in one container then packages it in another.

#Builder
FROM microsoft/dotnet:1.1.2-sdk-jessie
COPY /myapp /myapp
RUN dotnet restore ./myapp && \
    dotnet build -c release ./myapp && \
    dotnet publish -c release -o pubdir ./myapp

#Final Build
FROM microsoft/dotnet:1.1.2-runtime
COPY --from=0 /myapp/pubdir /myapp
ENV ASPNETCORE_URLS http://+:80
ENTRYPOINT ["dotnet", "/myapp/myapp.dll"]
EXPOSE 80

This file has two FROM instructions, which in a traditional Dockerfile only one is a allowed.… Read more

, , ,

How To,Resources,Tutorial

Migrating Legacy ASP.NET apps to Docker

Blaize Stewart

15 May , 2017  

Containers vs VMs

Many organizations, not wanting to rewrite applications, are figuring out how to take apps and containerize them for the cloud. Older operating systems are either end-of-life or approaching the end-of-life. Likewise, applications are increasingly being migrated to cloud hosts. The need to do this is as pressing as ever and containers offer a simple, viable solution to make this happen. Windows Containers on Docker bring to bear is the ability to “modernize” legacy .NET apps.

Containers by design improves application density on a given hardware by eliminating the need for redundant operating system installs. Unlike virtual machines that provide hardware abstraction on which a guest OS and apps are installed, containers provide operating system level abstraction, and apps run on top of that. This in effects removes all the CPU and memory requirements needed to run individual OS’s for apps and consolidates this into a single operating system (or multiple if running on a cluster). In the end, the savings are realized in terms of disk space, CPU, and memory consumption.

migrating asp.net apps to docker

Microsoft like many other organizations have embraced containers, and have formed a deep partnership with Docker to provide Windows containers. Moving legacy apps to containers is nuanced, and there is no one-size-fits-all approach, but this guide is intended to provide a high-level approach to getting your legacy ASP.NET apps into Windows containers.… Read more

, , ,

News

Master Containers on Windows Server 2016 With This New Webinar

Blaize Stewart

12 Dec , 2016   Video

One of the most anticipated features of Windows Server 2016 is container services. Microsoft has worked closely with Docker to create this exciting new feature for on-premise CaaS. Wintellect senior consultant Blaize Stewart has created a webinar in which you can learn  all about the new technology, the types of containers you can deploy on Windows Server 2016, and the Docker tools available to run and manage them.

Click on the video above to view, and share your feedback in the comments.… Read more

, , , ,

Video

Get to Know Docker In This New Webinar from Wintellect

Blaize Stewart

22 Sep , 2016   Video

Want to learn more about how containerization helps to enable advanced DevOps solutions using Docker?  Blaize Stewart just completed a new Webinar called An Introduction to Docker that shows how to utilize the Docker Hub to find pre-built images that can be used as is or as a basis for your own images.  He then shows how to build and deploy your own images for use in a Docker container.

docker

He also shows how the Docker ecosystem can be used to build a scalable deployment model for your DevOps solutions.  For more information, watch the complete video or check out our 2-day live virtual course “Docker Head to Toe“.… Read more

,

News

Azure Container Service Now Commercially Available

Paul Ballard

20 Apr , 2016  

Azure Container Service is out of preview and ready for prime time, Microsoft announced Tuesday. The service gives businesses a simple way to run their containerized applications in the cloud; it’s been available in preview since the end of last year.

Microsoft is offering Azure Container Service with a choice of two orchestration systems: Docker Swarm and Mesosphere’s Data Center Operating System, or DC/OS.

Microsoft also announced it is collaborating with Mesosphere and a number of other technology companies on an open-source version of DC/OS. DC/OS is powered by Apache Mesos technology, which major players like Twitter and Yelp already use to build and run distributed systems and applications. It can be operated from the web or command line, and includes an “app-store-like” environment for selecting and adding new components, according to a Microsoft blog post announcing the project.

Enterprises have moved quickly to adopt containers over the past couple of years, with Docker the leading vehicle for managing them. Containers allow for running multiple local development environments from the same host across different software and operating systems. Developers can more easily test and deploy projects uniformly, without using space-guzzling virtual machines.

 

 … Read more

, , , , ,

How To

What Developers Need to Know About Docker

Paul Ballard

20 Oct , 2015  

Docker is an application virtualization service based on features of the Linux operating system.  It provides a way to share a host OS, and using a virtualized filesystem, install and run Linux based apps in an isolated environment called a container.    The following diagram shows how Docker is different from Virtual Machines.

docker1

Docker Architecture

Docker is driven by a daemon running on the Host OS.  A client (either command line or UI using an open source tool like Kitematic) issues commands to the daemon to build, install, or execute an application image in a container.

docker2

The Docker daemon

As shown in the diagram above, the Docker daemon runs on a host machine. The user does not directly interact with the daemon, but instead through the Docker client.

The Docker client

The Docker client, in the form of the docker binary, is the primary user interface to Docker. It accepts commands from the user and communicates back and forth with a Docker daemon.

Inside Docker

To understand Docker’s internals, you need to know about three components:

  • Docker images.
  • Docker registries.
  • Docker containers.

Docker images

A Docker image is a read-only template. For example, an image could contain an Ubuntu operating system with Apache and your web application installed.… Read more

, ,

News

Windows Server 2016 Preview with Containers Support Released

Paul Ballard

19 Aug , 2015  

Microsoft has released its latest Technical Preview for Windows Server 2016 which includes support for Docker Containers baked in as well as new features and functionality in its Nano Server edition.

Today we are excited to release the first preview of Windows Server Containers as part of our Windows Server 2016 Technical Preview 3 release. We’re also announcing great updates from our close collaboration with Docker, including enabling support for the Windows platform in the Docker Engine and a preview of the Docker Engine for Windows. Our Visual Studio Tools for Docker, which we previewed earlier this year, have also been updated to support Windows Server Containers, providing you a seamless end-to-end experience straight from Visual Studio to develop and deploy code to both Windows Server and Linux containers. Last but not least, we’ve made it easy to get started with Windows Server Containers in Azure via a dedicated virtual machine image.  — Scott Guthrie’s Blog

Microsoft’s continued support for the Docker community also includes contributing to the Open Container Initiative as well as being a contributor for the open source Docker Engine for Windows Server.  Future Windows Server releases will include a new Hyper-V based container solution that provides more separation of hosted applications.… Read more

, ,

Uncategorized

Deploy ASP.NET 5 Apps to Docker on Azure

Tony Sneed

1 Jun , 2015  

NOTE: This post is part 4 of a series on developing and deploying cross-platform web apps with ASP.NET 5:

  1. Develop and Deploy ASP.NET 5 Apps on Mac OS X
  2. Develop and Deploy ASP.NET 5 Apps on Linux
  3. Deploy ASP.NET 5 Apps to Docker on Linux
  4. Deploy ASP.NET 5 Apps to Docker on Azure (this post)

Download instructions and code for this post here: https://github.com/tonysneed/Deploy-AspNet5-Azure-Docker.

Over the past few years, a phenomenon known as “the Cloud” has appeared. While the term is rather nebulous and can mean a number of different things, with regard to business applications it generally refers to a deployment model where apps run on servers provided by a third party that rents out computational resources, such as CPU cycles, memory and storage, on a pay-as-you-go basis. There are different service models for cloud computing, including infrastructure (IaaS), platform (PaaS) and software (Saas). In this post I’ll focus on the first option, infrastructure, which allows you set up Linux virtual machines where you can deploy Docker images with your ASP.NET 5 apps and all their dependencies. There are a number of players in the IaaS market, including Amazon Elastic Compute Cloud (EC2), Google Compute Engine (GCE) and Microsoft Azure, but I’ll show you how to deploy a Dockerized ASP.NET 5 app to Azure using Docker Hub, GitHub and the Docker Client for Windows.… Read more

, , , , ,

News

Amazon Unleashes New Cloud Offerings at AWS Summit

Paul Ballard

9 Apr , 2015  

Amazon has announced several new cloud services during their AWS Summit as well as some new features on existing cloud services.

Today’s AWS Summit Keynote included announcements for four new cloud services; Amazon EFS (Elastic File System), Amazon Machine Learning, AWS Marketplace for Desktop Apps, and Amazon Workspaces Application Manager.  They also showcased new features for EC2 including general availability of their new EC2 Container service supporting Docker containers as well as new features for AWS Lambda Event service.

The Amazon EFS service is a cloud based file system supporting the NFSv4 protocol and can be used by EC2 instances.  EFS is an SSD based file system that is scaled across multiple zones within an AWS region that can be scaled automatically and managed through the standard AWS Management Console.

The Amazon Machine Learning service allows large amounts of data to be ingested and then performs predictions on that data.  The service supports three types of predictions; binary classifications, multiclass classifications, and regression.

  • Binary classification is used to predict one of two possible outcomes. Is this transaction legitimate, will the customer buy this product, or is the shipping address an apartment complex?

  • Multiclass classification is used to predict one of three or more possible outcomes and the likelihood of each one.

Read more

, , ,

News

Microsoft Announces New Windows Server Features for Containers

Paul Ballard

8 Apr , 2015  

Microsoft announced today Hyper-V Container support to allow virtualization of Docker containers as well as a new barebones version of Windows Server called Nano Server.

Microsoft’s Server and Cloud Blog announced new features for Windows Server 2016 that adds further support for the Docker container application virtualization platform.  Docker is a platform for running individual applications in a virtualized environment called a container.  These containers can be hosted on Windows Server or Linux servers.  With the new Hyper-V support, those containers themselves can be virtualized and managed through Hyper-V.  Microsoft is actively involved in the Docker community as described in their blog post.

server-cloud-apr8-1.png-720x0

We have been working closely with the Docker community to leverage and extend container innovations in Windows Server and Microsoft Azure, including submitting the development of the Docker engine for Windows Server Containers as an open contribution to the Docker repository on GitHub. In addition, we’ve made it easier to deploy the latest Docker engine using Azure extensions to setup a Docker host on Azure Linux VMs and to deploy a Docker-managed VMdirectly from the Azure Marketplace. — Microsoft Servers and Cloud Blog

Microsoft also announced a new version of Windows Server called Nano Server.  … Read more

, , , ,