Skip to content

Commit

Permalink
Merge pull request #129 from carlossg/credentials-pass
Browse files Browse the repository at this point in the history
Use kaniko with docker config.json password
  • Loading branch information
tejal29 authored Oct 4, 2019
2 parents 9eb4a1c + 14ed530 commit de093f9
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,29 @@ See the `examples` directory for how to use with kubernetes clusters and persist

kaniko uses Docker credential helpers to push images to a registry.

kaniko comes with support for GCR and Amazon ECR, but configuring another credential helper should allow pushing to a different registry.
kaniko comes with support for GCR, Docker `config.json` and Amazon ECR, but configuring another credential helper should allow pushing to a different registry.

#### Pushing to Docker Hub

Get your docker registry user and password encoded in base64

echo USER:PASSWORD | base64

Create a `config.json` file with your Docker registry url and the previous generated base64 string

```
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "xxxxxxxxxxxxxxx"
}
}
}
```
Run kaniko with the `config.json` inside `/kaniko/.docker/config.json`
docker run -ti --rm -v `pwd`:/workspace -v config.json:/kaniko/.docker/config.json:ro gcr.io/kaniko-project/executor:latest --dockerfile=Dockerfile --destination=yourimagename
#### Pushing to Amazon ECR
Expand Down

0 comments on commit de093f9

Please sign in to comment.