1. Dokumentationen
  2. Cloud
  3. Azure
  4. Tutorials
  5. Publishing a Container

Dokumentationen

Publishing a Container

At a Glance

Goals

  1. You are able to start a public container image in Azure.
  2. You are able to access an exposed port of the container via an IP address.

Prerequisites

  1. Access to a Subscription is available.

References

This tutorial publishes a simple web server in a container. An overview of the service is provided in the service description.

Note

The container has the following characteristics:

  • The image is publicly available.
  • The web server is reachable on port tcp/80.

In this example, some settings are applied that may not be suitable for other container environments.

Creating the Container Instance

  1. Sign in to the Portal.

    Azure Portal

  2. Navigate to the Marketplace. Either type Marketplace in the search bar and select Marketplace, or click the central button.

    Marketplace

  3. Enter container-instances in the search field. Then, in the search results, click Create on the Container Instances entry.

    Container Instances

  4. In the Basics section, set or verify the following values:

    1. Subscription: the correct Subscription.
    2. Resource group: the correct Resource Group. If no Resource Group exists yet, a new one can be created via the Create new button.
    3. Container name: the name of the Container Instance.
    4. Region: the location; preferably (Europe) Switzerland North.
    5. Image source: select Other registry.
    6. Image: the URL to the public container image.

    Then click Next: Networking.

    Basics

  5. In the Networking section, enter a DNS name for the Container Instance and verify that the correct ports are forwarded (in this example, port tcp/80).

    Then click Next: Monitoring.

    Networking

  6. In the Monitoring section, disable the Enable container instance log option. Then click Review + create.

    Monitoring

  7. In the Review + create section, verify all entries and, if correct, click Create.

    Review and create

  8. The deployment of the Container Instance can take several minutes.

    Deployment

  9. Once the operation is complete, click Go to resource to switch to the new resource.

    Deployment complete

  10. In the overview, verify that the container is in the Running state.

    Verify status

  11. Copy the FQDN to the clipboard. To do so, hover over the FQDN with the mouse pointer and click the Copy to clipboard icon.

    Copy FQDN

The container can then be accessed via the FQDN in a browser.

In this example, the following website was published:

Website