Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Docker Pipeline example to README.md #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ Then, in the "Docker Credential" dropdown, select your account marked as "Google

Save your configuration and run your job.

### Note when using [Cloudbees Docker Pipeline Plugin](https://wiki.jenkins.io/display/JENKINS/Docker+Pipeline+Plugin)

The Jenkins credentials ID needs to be prefixed with `gcr:` to work with the Cloudbees Docker Pipeline Plugin. So, for example, if you named your credentials "google-container-registry-project", then your Jenkinsfile should look like the following:

```groovy
stage('Push images') {
docker.withRegistry('https://us.gcr.io', 'gcr:google-container-registry-project') {
myContainer.push("${env.BUILD_NUMBER}")
myContainer.push("latest")
}
}
```

Security Warning
===
Docker Build Step Plugin will pass the credentials to Docker server daemon. If the Docker server daemon listens on HTTP port without using TLS, this will create a security hole because the credentials (not encrypted, only base64 encoded) can be intercepted via the HTTP traffic. This is a problem of Docker itself. Configuring the Docker server daemon to listen on HTTP port without using TLS is strongly discouraged. When communication to Docker daemon on a remote machine is needed, the traffic can be secured by HTTPS, see Docker's documentation: http://docs.docker.com/articles/https/.
Expand Down