{"action":"created","issue":{"url":"https://api.github.com/repos/jpetazzo/dind/issues/66","labels_url":"https://api.github.com/repos/jpetazzo/dind/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/jpetazzo/dind/issues/66/comments","events_url":"https://api.github.com/repos/jpetazzo/dind/issues/66/events","html_url":"https://github.com/jpetazzo/dind/issues/66","id":69423924,"number":66,"title":"jenkins slave dind","user":{"login":"t5unamie","id":4137998,"avatar_url":"https://avatars.githubusercontent.com/u/4137998?v=3","gravatar_id":"","url":"https://api.github.com/users/t5unamie","html_url":"https://github.com/t5unamie","followers_url":"https://api.github.com/users/t5unamie/followers","following_url":"https://api.github.com/users/t5unamie/following{/other_user}","gists_url":"https://api.github.com/users/t5unamie/gists{/gist_id}","starred_url":"https://api.github.com/users/t5unamie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t5unamie/subscriptions","organizations_url":"https://api.github.com/users/t5unamie/orgs","repos_url":"https://api.github.com/users/t5unamie/repos","events_url":"https://api.github.com/users/t5unamie/events{/privacy}","received_events_url":"https://api.github.com/users/t5unamie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-19T13:17:51Z","updated_at":"2015-06-18T21:12:00Z","closed_at":null,"body":"Hi There,\r\n\r\nI have tried create a container that has dind and sshd for jenkins slave. I have tried to do this 3 different ways.\r\n\r\n1> Create a container from the  jpetazzo/dind.\r\n\r\n{code}\r\nPlease find buildfile below.\r\n\r\n# Based on Ubuntu\r\n############################################################\r\n\r\n# Set the base image to Ubuntu\r\nFROM jpetazzo/dind\r\n\r\n# File Author / Maintainer\r\nMAINTAINER Johnathan Phan\r\n\r\n# Enviroment setup\r\n\r\n\r\n################## BEGIN INSTALLATION ######################\r\n\r\n# Update system\r\nRUN apt-get update\r\n\r\n# Install a basic SSH and docker server\r\nRUN apt-get install -y openjdk-7-jdk openssh-server\r\nRUN sed -i 's|session    required     pam_loginuid.so|session    optional     pam_loginuid.so|g' /etc/pam.d/sshd\r\nRUN mkdir -p /var/run/sshd\r\nRUN adduser --quiet jenkins\r\nRUN echo \"jenkins:jenkins\" | chpasswd\r\nRUN usermod -a -G 0 jenkins\r\nADD scripts/jenkins-slave-startup.sh /\r\nRUN chmod +x jenkins-slave-startup.sh\r\n\r\n# Standard SSH port\r\nEXPOSE 22\r\n{code}\r\n\r\n2> Tried to use https://registry.hub.docker.com/u/tehranian/dind-jenkins-slave/dockerfile/ directly.\r\n\r\n3> Tried to create my own container with build file merging commands and files from bother jpetazzo/dind and evarga/jenkins-slave.\r\n\r\nI get continous issues concerning running docker in docker with another service.\r\n\r\nFor example in the first example where I extend dind. I get the following error inside the container.\r\n\r\nINFO[0000] +job serveapi(unix:///var/run/docker.sock)\r\nINFO[0000] Listening for HTTP on unix (/var/run/docker.sock)\r\nWARN[0000] WARNING: Udev sync is not supported. This will lead to unexpected behavior, data loss and errors\r\nERRO[0000] There are no more loopback devices available.\r\nFATA[0000] loopback mounting failed\r\n\r\nI don't know why this does'nt work.\r\n\r\nCan someone help me?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jpetazzo/dind/issues/comments/113291250","html_url":"https://github.com/jpetazzo/dind/issues/66#issuecomment-113291250","issue_url":"https://api.github.com/repos/jpetazzo/dind/issues/66","id":113291250,"user":{"login":"hayderimran7","id":4046529,"avatar_url":"https://avatars.githubusercontent.com/u/4046529?v=3","gravatar_id":"","url":"https://api.github.com/users/hayderimran7","html_url":"https://github.com/hayderimran7","followers_url":"https://api.github.com/users/hayderimran7/followers","following_url":"https://api.github.com/users/hayderimran7/following{/other_user}","gists_url":"https://api.github.com/users/hayderimran7/gists{/gist_id}","starred_url":"https://api.github.com/users/hayderimran7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hayderimran7/subscriptions","organizations_url":"https://api.github.com/users/hayderimran7/orgs","repos_url":"https://api.github.com/users/hayderimran7/repos","events_url":"https://api.github.com/users/hayderimran7/events{/privacy}","received_events_url":"https://api.github.com/users/hayderimran7/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T21:12:00Z","updated_at":"2015-06-18T21:12:00Z","body":"@jpetazzo with your solution of `-v /var/run/docker.sock:/var/run/docker.sock` i get this :\r\n```\r\n----- No docker socket bind mounted in, so lets attempt to wrap it DIND style ----\r\ntime=\"2015-06-18T14:03:42-07:00\" level=\"info\" msg=\"+job serveapi(tcp://0.0.0.0:2375, unix:///var/run/docker.sock)\"\r\ntime=\"2015-06-18T14:03:42-07:00\" level=\"info\" msg=\"Listening for HTTP on tcp (0.0.0.0:2375)\"\r\ntime=\"2015-06-18T14:03:42-07:00\" level=\"info\" msg=\"/!\\\\ DON'T BIND ON ANOTHER IP ADDRESS THAN 127.0.0.1 IF YOU DON'T KNOW WHAT YOU'RE DOING /!\\\\\"\r\ntime=\"2015-06-18T14:03:42-07:00\" level=\"info\" msg=\"Listening for HTTP on unix (/var/run/docker.sock)\"\r\ndevice or resource busy\r\ntime=\"2015-06-18T14:03:42-07:00\" level=\"info\" msg=\"-job serveapi(tcp://0.0.0.0:2375, unix:///var/run/docker.sock) = ERR (1)\"\r\ntime=\"2015-06-18T14:03:42-07:00\" level=\"fatal\" msg=\"device or resource busy\"\r\n```\r\nare you saying we should not use `wrapdocker` script when using jenkins and just mount the `/var/run/docker.sock` , not sure how to proceed with your solution ://"}}