12 November 2018 Docker, Azure, Container Robert Muehsig

x

Azure Container Instances

There are (at least) 3 diffent ways how to run a Docker Container on Azure:

In this blogpost we will take a small look how to run a Docker Container on this service. The “Azure Container Instances”-service is a pretty easy service and might be a good first start. I will do this step for step guide via the Azure Portal. You can use the CLI or Powershell. My guide is more or less the same as this one, but I will highlight some important points in my blogpost, so feel free to check out the official docs.

Using Azure Container Instances

1. Add new…

At first search for “Container Instances” and this should show up:

x

2. Set base settings

Now - this is propably the most important step - choose the container name and source of the image. Those settings can’t be changed later on!

The image can be from a Public Docker Hub repository or from a prive docker registry.

Important: If you are using a Private Docker Hub repository use ‘index.docker.io’ as the login server. It took me a while to figure that out.

x

3. Set container settings

Now you need to choose which OS and how powerful the machine should be.

Important: If you want an easy access via HTTP to your container, make sure to set a “DNS label”. With this label you access it like this: customlabel.azureregion.azurecontainer.io

x

Make sure to set any needed environment variables here.

Also keep in mind: You can’t change this stuff later on.

Ready

In the last step you will see a summery of the given settings:

x

Go

After you finish the setup your Docker Container should start after a short amount of time (depending on your OS and image of course).

x

The most important aspect here:

Check the status, which should be “running”. You can also see your applied FQDN.

Summery

This service is pretty easy. The setup itself is not hard, but sometimes the UI seems “buggy”, but if you can run your Docker Container locally, you should also be able to run it on this service.

Hope this helps!


Written by Robert Muehsig

Software Developer - from Saxony, Germany - working on primedocs.io. Microsoft MVP & Web Geek.
Other Projects: KnowYourStack.com | ExpensiveMeeting | EinKofferVollerReisen.de