Created
April 22, 2020 14:02
-
-
Save adrianriobo/19224203a95471cdea53ab698f8967ba to your computer and use it in GitHub Desktop.
Buildah with Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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