- vagrant up時にdockerのrestartを実行しようとしている
- その際の実行ユーザーが
vagrant
なんだけど、restartする権限が無い
% vagrant -v
Vagrant 1.5.4
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define :vmwheezydocker do |vmwheezydocker|
vmwheezydocker.vm.box = "debian_wheezy_64_vanilla"
vmwheezydocker.vm.box_url = "https://dl.dropboxusercontent.com/s/3jz559mjz2aw4gs/debian-wheezy-64-vanilla.box"
vmwheezydocker.vm.hostname = "vmwheezydocker"
vmwheezydocker.vm.network :private_network, ip: "192.168.56.112"
vmwheezydocker.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", 768]
end
vmwheezydocker.vm.provision :docker do |d|
d.pull_images "ubuntu"
end
end
end
% vagrant up
==> vmwheezydocker: Running provisioner: docker...
vmwheezydocker: Installing Docker (latest) onto machine...
vmwheezydocker: Configuring Docker to autostart containers...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
stop docker
Stdout from the command:
Stderr from the command:
stdin: is not a tty
bash: line 2: stop: command not found
- VM確認
- dockerコマンドがvagrantユーザーだとパーミッションエラー
- sudo付きだとOK
- vagrant ver1.4時代はvagrantユーザーでも問題なかった
- vagrantかdockerいずれかのバージョンアップに起因して挙動が変わった?
% vagrant ssh
$ which docker
/usr/bin/docker
$ docker -v
Docker version 0.10.0, build dc9c28f
$ docker images
2014/05/02 09:04:38 dial unix /var/run/docker.sock: permission denied
$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE