Skip to content

Push Images and Helm Charts to AWS ECR with Podman

ECR logo

This guide demonstrates how to build and push container images and Helm charts to an Amazon ECR repository using Podman on macOS or Linux.


Step 1. Build and Tag the Container Image

export AWS_ACCOUNT_ID="123456789012"
export AWS_REGION="eu-west-1"
export REPO_NAME="myapp"
export IMAGE_TAG="v0.1.0"

# Build for AMD64 architecture
podman build --arch amd64 -t ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${REPO_NAME}:${IMAGE_TAG} .

Step 2. Authenticate and Push the Image

# 1. Log in to ECR using Podman
aws ecr get-login-password --profile labs --region ${AWS_REGION} \
  | podman login --username AWS --password-stdin ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com

# 2. Push image to ECR
podman push ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${REPO_NAME}:${IMAGE_TAG}

Step 3. Package and Push Helm Chart (OCI)

# 1. Package the chart
helm package myapp-helm

# 2. Log in to ECR with Helm
aws ecr get-login-password --profile labs --region ${AWS_REGION} \
  | helm registry login --username AWS --password-stdin ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com

# 3. Push chart package to ECR
helm push myapp-helm-0.3.0.tgz oci://${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/

OCI Registry Syntax

When pushing Helm charts via OCI (oci://...), specify the registry root URL. Helm automatically resolves the chart repository name from the packaged chart archive.