📦 Containers on the Cloud: Images, Registries and Serverless Containers

How a container image gets from your laptop to a registry and then runs on Azure, AWS, Google Cloud or Oracle Cloud without you managing a server: the Dockerfile habits that matter, the four registries, and the four serverless container services

💡 How this page was written. From the providers' and Docker's own documentation, read on 6 October 2026. Nothing here was built or run, and no cloud account was available. Every command is marked from the documentation, not run here. The concepts of images, registries and running OCI containers were run for real, with Podman on FreeBSD, on the FreeBSD Corner's containers page: read that one for real output. The accounts, regions and IAM pages of this series explain what the commands below assume: account pages, networking and IAM.

What a container is, in four words

An image, a registry, a runtime.

The promise: build once, run the same thing on a laptop, a virtual machine or a managed service.

Three ways to run containers on a cloud

  1. On a virtual machine you manage. Install Docker (or Podman) on a VM and docker run. Simple and flexible, and you patch the machine, restart it, and watch it. It is what the free VM guides give you a place to do.
  2. Serverless containers. You give the cloud an image and a size, and it runs it, scales it and bills for use. No servers to patch. This page is mostly about this.
  3. Kubernetes. A cluster that runs many containers with scheduling, rolling updates and service discovery (EKS, AKS, GKE, OKE). It is powerful and it is a subject of its own: the Kubernetes node access tutorial is the start, and a cluster setup tutorial is on the Coming Soon list.

What each cloud calls the serverless option:

The image: a Dockerfile that behaves

A Dockerfile is the recipe. From Docker's best-practices documentation (read on 6 October 2026), the habits that matter, followed by an example:

FROM python:3.13-slim

WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .
RUN useradd --create-home appuser
USER appuser

EXPOSE 8080
CMD ["python", "app.py"]

(An illustration, not built here. python:3.13-slim is an example tag: pin the one you use. Pinning to a digest is FROM python:3.13-slim@sha256:....)

Never put secrets in an image. Anyone who can pull the image can read every layer. Pass configuration at run time (environment variables, a secrets service) and use the platform's identity for access (the machine-identity section of the IAM page).

What a serverless platform expects of your container

From Google's Cloud Run documentation, and in practice the same on the others:

Registries

A cloud runs images from a registry. Each cloud has a private one, and the image name includes the registry's address:

The push routine (from the documentation, not run here)

Always the same four steps: sign the Docker client in to the registry, tag the image with the registry's address, push, and let the cloud pull it.

# AWS
aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin ACCOUNT.dkr.ecr.eu-west-1.amazonaws.com
docker tag myapp:1.0 ACCOUNT.dkr.ecr.eu-west-1.amazonaws.com/myapp:1.0
docker push ACCOUNT.dkr.ecr.eu-west-1.amazonaws.com/myapp:1.0

# Azure
az acr login --name myregistry
docker tag myapp:1.0 myregistry.azurecr.io/myapp:1.0
docker push myregistry.azurecr.io/myapp:1.0

# Google Cloud
gcloud auth configure-docker us-central1-docker.pkg.dev
docker tag myapp:1.0 us-central1-docker.pkg.dev/PROJECT_ID/myrepo/myapp:1.0
docker push us-central1-docker.pkg.dev/PROJECT_ID/myrepo/myapp:1.0

# Oracle Cloud
docker login us-phoenix-1.ocir.io -u 'NAMESPACE/USERNAME'
docker tag myapp:1.0 us-phoenix-1.ocir.io/NAMESPACE/myapp:1.0
docker push us-phoenix-1.ocir.io/NAMESPACE/myapp:1.0

Running the image

Google Cloud: Cloud Run

From the documentation: Cloud Run runs container images (or builds them from source code with buildpacks). It has services (handle HTTP requests, with a unique HTTPS endpoint and autoscaling) and jobs (run to completion, once or on a schedule). By default, with no requests, even the last instance is removed (scale to zero), and with request-based billing "if an instance is not processing requests, you're not charged", in 100 ms steps. Invocation can be public, restricted by IAM, or behind Identity-Aware Proxy.

gcloud run deploy myapp --image us-central1-docker.pkg.dev/PROJECT_ID/myrepo/myapp:1.0 --region us-central1 --no-allow-unauthenticated

(From the documentation, not run here. --no-allow-unauthenticated makes the service private: choose that on purpose, and see the IAM page for who may call it.)

Azure: Container Apps

Microsoft describes it as "a serverless platform for running containerized applications without managing the underlying infrastructure". It scales on HTTP traffic, events, CPU or memory, or any KEDA scaler. Most applications can scale to zero (not those that scale on CPU or memory load). It can enable HTTPS or TCP ingress, run jobs (on demand, scheduled or event-driven), keep multiple revisions with traffic splitting for blue/green and A/B tests, run containers from any registry (Docker Hub and ACR included), join your own virtual network, hold secrets, and write logs to Log Analytics.

az containerapp up --name myapp --resource-group lab-rg --image myregistry.azurecr.io/myapp:1.0 --ingress external --target-port 8080

(From the documentation, not run here, and the container apps commands live in an extension that the CLI offers to install. Check az containerapp up --help before you rely on the exact options.)

AWS: ECS and Fargate

Amazon ECS has three layers: capacity (where containers run), the controller (the scheduler), and the tools you use. The words to learn:

Capacity can be Fargate (serverless, "you don't need to manage servers, handle capacity planning"), EC2 instances that you manage, ECS Managed Instances (EC2 with AWS handling the maintenance) or ECS Anywhere (your own servers). It works with ECR for images, Elastic Load Balancing for traffic and CloudWatch for logs. Two IAM roles matter: the one that lets ECS pull your image and write logs, and the one your code uses to call other services (the machine-identity idea of the IAM page: no keys inside the image).

Oracle Cloud: Container Instances

Oracle: "a serverless compute service for running containers without managing servers", with VM-level isolation, flexible shapes (you choose the OCPUs and memory) and no orchestration (it is for APIs, build jobs, automation and test environments: for orchestration, use OKE, the Kubernetes service). Containers run in a subnet of your VCN, images come from OCIR or other registries (for a private registry, keep the credentials in Vault), and there are restart policies and graceful shutdown. Billing: an instance is billed while Active and while Updating, and not while Creating, Inactive (stopped), Failed or Deleted. A stopped one still counts toward your service limits.

What every platform needs from you

What it costs

Which one?

Common mistakes

The cheat sheet

← Cloud IAM Essentials: Who Can Do What, and Where · ↑ All tutorials · Kubernetes on the Cloud: A Managed Cluster and kubectl →