Getting started with OCI Container Instances

December 7, 2022 | 4 minute read
Rishikesh Palve
Principal Product Manager
Greg Verstraeten
Senior Principal Product Manager
Text Size 100%:

We have announced the availability of Oracle Cloud Infrastructure (OCI) Container Instances, a serverless compute service that enables you to instantly run containers without managing any servers. In this article, we dive into using Container Instances.

Run a containerized application using OCI Container Instances

This video walks you through the creation of a container instance to run a full-stack application with the following steps:

  1. Provide container instance details

  2. Specifying the container images and the launch configuration

  3. Reviewing and creating the container instances

We also showcase logging and monitoring for your containerized applications. For written instructions to accompany the video, see the Instructions section.


In the Oracle Cloud Console, navigate to Developer Services and select Container Instances. Click Create container instance. The guidance provides a simple experience to create container instances.

Step 1: Provide container instance details.

  • General information: Provide a name for your container instance and, optionally, a compartment for your container instance.

  • Placement: Select the OCI availability domain and fault domain in which you want the container instance to run.

  • CPU and memory requirements: Select a processor shape and the number of cores and memory you want to allocate to your container instance. Container Instances service isn’t just suitable for lightweight workloads, but also for the most resource-intensive applications. You can allocate all the CPU and memory provided by the underlying Compute shape to a container instance. For example, you can allocate up to 64 cores (128 vCPUs) and 1024-GB memory to a single container instance by selecting E3 or E4 Flex shapes.

  • Networking: Select a virtual cloud network (VCN) and a subnet to connect the container instance. Through native integration with OCI VCN, you can control the traffic to your application. Each container instance connects to your VCN using a virtual network interface card (VNIC) and gets a private IP address. You can also assign a public IP to expose your application to the internet. Using network security groups (NSGs), you can configure ingress and egress rules to control the traffic to and from your application.

    A screenshot of the Networking section of the Create Container Instance page.

  • Restart policy and graceful shutdown timeout: Expand the advanced options to uncover the container restart policy and graceful shutdown timeout. The container restart policy is used to control how containers restart automatically. You have the options of always, never, and on failure. Graceful shutdown timeout lets you define the amount of time the running containers have to stop gracefully.

Step 2: Specify the container images and the launch configuration:

  • Container image: Select the container image for each container you want to process. Container Instances supports pulling images from any public or private container registries compliant with Open Container Initiative. Through the native integration with OCI Container Registry, you can use private repositories and image scanning, for improved security.

    A screenshot of the Container Image page in the Configure Containers tab of the Create Container Instance page.

  • Control the running of your containers: You can optionally set environment variables to customize the processing of your containers, such as MYSQL_PASSWORD: XXXX.

    If you’re running multiple containers on the same container instance, you can enable resource throttling to restrict the amount of CPU and memory each container can consume. You can also override the entry point command and arguments for each container. For example, you can specify more arguments to the entry point of your container image.

Step 3: Review and create: Review the settings for your container instances and click Create.

Your containerized application is now running and is accessible through its public or private IP. You can now monitor and check your application logs.

Built-in logging and monitoring

Container Instances provides built-in logging so that you can view container logs on the Oracle Cloud Console or pull them using the API.

 A screenshot of the View Logs page in the Container Instances workspace.

It also provides built-in metrics to monitor the performance such as CPU and memory utilization, disk I/O, network receive and transmit bytes, and so on. You can view these metrics on the Container Instances console or access them in the OCI Monitoring service.

A screenshot of the Metrics page of the Container Instances Resources page.


OCI Container Instances service provides a simple, quick, and secure way to run containers without managing any servers. Unlike other cloud providers, you don't pay any extra charges for the serverless experience of OCI Container Instances, giving you the best value option for running containers in the cloud.

Sign up to attend our webcast in January 2023, where we share how customers use OCI Container Instances!

For running your containerized apps on Kubernetes without managing infrastructure, see Oracle Container Engine for Kubernetes (OKE).

For more information about Oracle Cloud Infrastructure Container Instances, see the following resources:

Rishikesh Palve

Principal Product Manager

OCI Serverless Containers, Kubernetes, and Functions services.

Greg Verstraeten

Senior Principal Product Manager

Previous Post

Announcing the availability of OCI Container Instances

Rishikesh Palve | 5 min read

Next Post

OCI or Azure: Which offers the best value for serverless container instances?

Brian Wood | 11 min read