Skip to content

Instantly share code, notes, and snippets.

@adrianriobo
Created April 22, 2020 14:02
Show Gist options
  • Save adrianriobo/19224203a95471cdea53ab698f8967ba to your computer and use it in GitHub Desktop.
Save adrianriobo/19224203a95471cdea53ab698f8967ba to your computer and use it in GitHub Desktop.
Buildah with Dockerfile
# Run container with docker context
docker run -it --privileged -v $PWD:/opt quay.io/buildah/stable:v1.14.0 bash
# Build image
buildah bud --format oci --storage-driver=vfs --layers -t image:version .
# Get ECR credentials
aws ecr get-login
export ECR_LOGIN=AWS
export ECR_TOKEN=...
# Push image
buildah push --storage-driver=vfs --creds ${ECR_LOGIN}:${ECR_TOKEN} image:version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment