SvenDowideit / dockerfiles

dockerfiles that I use
http://fosiki.com
MIT License
212 stars 59 forks source link

Couldn't get it working with boot2docker #10

Closed ustun closed 10 years ago

ustun commented 10 years ago

Here is what I have done:

  1. Created a redis with data folder synced.
  2. ssh'ed into boot2docker instance
  3. Run as instructed.
 ✗ docker run -d --name redis  -v ~/redis_data:/data -p 6379:6379 dockerfile/redis
6dfd4ededb9e6d2c222b610c271ed041f73fbef1bb5fbb14b3a6b7b275810bd1
 ✗ boot2docker ssh
Warning: Permanently added '[localhost]:2022' (RSA) to the list of known hosts.
                        ##        .
                  ## ## ##       ==
               ## ## ## ##      ===
           /""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~
           \______ o          __/
             \    \        __/
              \____\______/
 _                 _   ____     _            _
| |__   ___   ___ | |_|___ \ __| | ___   ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__|   <  __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
boot2docker: 1.1.0
             master : 086c429 - Fri Jul  4 01:08:20 UTC 2014
docker@boot2docker:~$ docker run --rm -v $(which docker):/docker -v $(/var/run/docker.sock):/docker.sock -e DOCKER_HOST svendowideit/sam
ba redis
-sh: /var/run/docker.sock: Permission denied
2014/07/04 21:33:19 Error response from daemon: Could not create local directory '' for bind mount: mkdir : no such file or directory!
docker@boot2docker:~$ 
$(/var/run/docker.sock)
cpuguy83 commented 10 years ago

I'm going to guess you need to use sudo here since you are doing this directly in a boot2docker shell.

ustun commented 10 years ago

OK, so I think this is a bug in the info output.

It should read:

docker run --rm -v $(which docker):/docker -v /var/run/docker.sock:/docker.sock -e DOCKER_HOST svendowideit/samba redis

not

docker run --rm -v $(which docker):/docker -v $(/var/run/docker.sock):/docker.sock -e DOCKER_HOST svendowideit/samba redis

No $() around /var/run/docker.sock

SvenDowideit commented 10 years ago

@ustun you're right. this is fixed in master one more and I'll make sure the image is rebuilt.

SvenDowideit commented 10 years ago

please re docker pull svendowideit/samba