Skip to content

Instantly share code, notes, and snippets.

@polster
Created November 25, 2019 12:58
Show Gist options
  • Save polster/67371be747d4a2984abd58b7cb066c3b to your computer and use it in GitHub Desktop.
Save polster/67371be747d4a2984abd58b7cb066c3b to your computer and use it in GitHub Desktop.
Build and push docker image with Kaniko, assuming local Dockerfile within the workspace
docker run \
-v $(pwd):/workspace:ro \
-v ~/.kaniko/config.json:/kaniko/.docker/config.json:ro \
-v ~/.kaniko/credentials:/root/.aws/credentials:ro \
gcr.io/kaniko-project/executor:latest \
--context=/workspace \
--destination=ACCOUNT_ID.dkr.ecr.REGION.amazonaws.com/NAME_SPACE/IMAGE_NAME:latest --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment