-
-
Save wrabbit-revisited/1d70d0f1805be1848c08 to your computer and use it in GitHub Desktop.
docker /var/run/docker.sock issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -e "/var/run/docker.sock" ]; | |
then | |
echo "docker.sock found" | |
else | |
echo "docker.sock not found" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker build -t "testdockersock" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.4 | |
MAINTAINER dja | |
# Install Docker binary | |
RUN wget -nv https://get.docker.com/builds/Linux/x86_64/docker-1.3.3 -O /usr/bin/docker && \ | |
chmod +x /usr/bin/docker | |
VOLUME /src | |
WORKDIR /src | |
COPY build.sh / | |
ENTRYPOINT ["/build.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker run --rm --privileged -v `pwd`:/src -v /var/run/docker.sock:/var/run/docker.sock testdockersock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment