jenkinsci / jenkinsci/docker-plugin
bad Volumes Option UX, require multiline input
- Dominant language
- Java
- Stars
- 498
- Forks
- 324
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 2
Description
Potentially similar to https://github.com/jenkinsci/docker-plugin/issues/206 but wanted to isolate this issue and see if I'm missing something with how the "Volumes" options works under the "Container Settings" menu.
I'm running a Jenkins Master using the official [Jenkins Docker image](https://hub.docker.com/_/jenkins/). I'm bind mounting the docker socket into the Jenkins docker container as suggested here https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/:
```yaml
version: "2.1"
services:
jenkinsdata:
build: ${DATA_CONTAINER}
jenkinsmaster:
build: ${MASTER_CONTAINER}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${DOCKER_BIN:-/usr/bin/docker}:/usr/bin/docker
volumes_from:
- jenkinsdata
ports:
- "50000:50000"
jenkinsnginx:
build: ${NGINX_CONTAINER}
ports:
- "80:80"
links:
- jenkinsmaster:${MASTER_CONTAINER}
```
This works fine for using `docker` commands within builds running on master.
Now, I've switched to running jobs on a slave server using the Jenkins docker-plugin using the `evarga-jenkins-slave` image.

A simple freestyle build works fine on the slave, but bind mounting the docker socket into the slave container using the "Volumes" option under "Container Settings" does not seem to work if I do `which docker` in the build it fails. Maybe there is something I don't understand about mounting volumes in the docker slave or am passing config incorrectly?
#### Jenkins Version
```
2.32.2
```
#### Docker Version
```
Client:
Version: 1.13.1
API version: 1.26
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 06:50:14 2017
OS/Arch: linux/amd64
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 06:50:14 2017
OS/Arch: linux/amd64
Experimental: false
```
#### Plugins
```
docker-workflow:1.10
mailer:1.20
workflow-job:2.10
git:3.2.0
ant:1.4
pam-auth:1.3
pipeline-graph-analysis:1.3
authentication-tokens:1.3
ssh-credentials:1.13
build-timeout:1.18
matrix-auth:1.4
ws-cleanup:0.32
pipeline-stage-tags-metadata:1.1.2
credentials-binding:1.11
ssh-agent:1.14
structs:1.6
github:1.26.2
handlebars:1.1.1
pipeline-milestone-step:1.3.1
pipeline-rest-api:2.6
workflow-support:2.14
rebuild:1.25
credentials:2.1.13
workflow-aggregator:2.5
bouncycastle-api:2.16.1
github-api:1.85
ace-editor:1.1
external-monitor-job:1.7
github-branch-source:2.0.5
icon-shim:2.0.3
gradle:1.26
windows-slaves:1.3.1
resource-disposer:0.6
junit:1.20
antisamy-markup-formatter:1.5
mapdb-api:1.0.9.0
github-organization-folder:1.6
ldap:1.14
docker-commons:1.6
jquery-detached:1.2.1
workflow-step-api:2.9
workflow-cps:2.29
pipeline-model-api:1.1.2
workflow-durable-task-step:2.10
git-client:2.4.1
pipeline-input-step:2.5
matrix-project:1.9
pipeline-stage-view:2.6
email-ext:2.57.1
workflow-basic-steps:2.4
script-security:1.27
token-macro:2.1
pipeline-stage-step:2.2
scm-api:2.1.1
durable-task:1.13
timestamper:1.8.8
pipeline-model-extensions:1.1.2
pipeline-build-step:2.4
workflow-cps-global-lib:2.7
pipeline-model-definition:1.1.2
cloudbees-folder:6.0.3
workflow-api:2.12
ssh-slaves:1.16
branch-api:2.0.8
pipeline-github-lib:1.0
pipeline-model-declarative-agent:1.1.1
momentjs:1.1.1
workflow-multibranch:2.14
plain-credentials:1.4
workflow-scm-step:2.4
git-server:1.7
ghprb:1.35.0
subversion:2.7.2
docker-plugin:0.16.2
display-url-api:1.1.1
```
#### config.xml
```xml
docker
2
docker-slave
22
JenkinsDockerSlave
0
0
/home/jenkins
1
EXCLUSIVE
10
10
1
dfp/jenkins-slave
/var/run/docker.sock:/var/run/docker.sock /usr/bin/docker:/usr/bin/docker
false
false
false
false
PULL_LATEST
2
docker-slave-evarga
22
JenkinsDockerSlave
0
0
/home/jenkins
1
EXCLUSIVE
10
10
1
evarga/jenkins-slave
/var/run/docker.sock:/var/run/docker.sock /usr/bin/docker:/usr/bin/docker
false
false
false
false
PULL_LATEST
tcp://:4243
5
15
5
```
Contributor guide
Assessment
This issue has not been assessed yet.