# Cloud Containers

In [Docker Primer](/open-source-iot/docker-primer.md), you ran multiple containers on your local machine: a Realtime container that connected to a Redis container. The Redis container is based on the Redis container image on Docker Hub. The Realtime container is built from custom Go code. The Realtime container exposes a web page at <http://localhost:8888> that connects to <http://localhost:888/socket.io> for realtime updates. The protocol used to obtain real time updates is either XHR Polling or WebSockets. The diagram below illustrates the setup:

![](/files/-MFAbTu44K66ThjBlwX6)

In the next section, we will look at running these containers (Redis and Realtime) in a public cloud context. In this book, we will primarily use Microsoft Azure.

## Azure Container Instances

With Azure Container Instances (ACI), Azure provides a simple way to run one or more containers in a container group. Continuing with our socket.io example, we will run the Redis and Realtime containers in such a group.

If you do not have access to an Azure subscription, go to <https://azure.microsoft.com/en-us/free/> to obtain a free account. Simply follow the steps after clicking the Start Free button. When you are done, you will see the portal:

![](/files/-MFAbTu5I0QvND-fRfJg)

Click **+ Create a resource** and then click **Containers**. Container Instances are listed under Kubernetes Service:

![](/files/-MFAbTu6_6c3iG2kyeY6)

The portal is great if you want to run one container. If you want to run multiple containers in a container group, you will need to create a YAML file or an Azure Resource Manager (ARM) template. We will use a YAML file first and then show the corresponding ARM template. Whether you use a YAML file or an ARM template, in both cases you will need to use a command line to submit a deployment task.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://geert-baeke.gitbook.io/open-source-iot/cloud-containers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
