Skip to content

Instantly share code, notes, and snippets.

@mikesplain
Created December 19, 2016 16:49
Show Gist options
  • Save mikesplain/5a19ed423055e001019804c6ae354c7e to your computer and use it in GitHub Desktop.
Save mikesplain/5a19ed423055e001019804c6ae354c7e to your computer and use it in GitHub Desktop.
Jenkins kubernetes dind
podTemplate(label: 'mypod', containers: [
containerTemplate(name: 'docker', image: 'docker:dind', ttyEnabled: true, alwaysPullImage: true, privileged: true,
command: 'dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay')
],
volumes: [emptyDirVolume(memory: false, mountPath: '/var/lib/docker')]) {
node ('mypod') {
stage 'Run a docker thing'
container('docker') {
stage 'Docker thing1'
sh 'docker pull redis'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment