こんにちは。かねしろ@pinkrootです。
久しぶりにVagrant + Dockerな開発環境でも作ろうか、と思い
はるか昔に作成していたVagrantfileからVMを立ち上げようとしました。
Vagrantfileは下記の内容。おそらくどこかのチュートリアルなどを見ながら記載したものです。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
Vagrant.configure(2) do |config| config.vm.box = "hashicorp/precise64" config.vm.provider "virtualbox" do |v| v.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"] end # 最新のdockerをインストール config.vm.provision "docker" # RailsサーバのPort転送 config.vm.network "forwarded_port", guest: 3000, host: 3000 #NFS共有を動かすためにプライベートネットワークが必要 config.vm.network "private_network", ip: "192.168.50.4" #/appフォルダを作り、そことNFSで接続しホストOSとの共有ディレクトリとする config.vm.synced_folder ".", "/app", type: "nfs" end |
環境はMac OS X Yosemite (10.10.5)で、Vagrantのバージョンは1.7.2でした。
去年の秋頃にはこのファイルの有るディレクトリで
1 2 |
vagrant up |
なコマンドでうまくVMが立ち上がったのですが、今日は下記のようなエラーが。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
==> default: Running provisioner: docker... default: Installing Docker (latest) onto machine... The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! apt-get update Stdout from the command: Ign http://us.archive.ubuntu.com precise InRelease Hit http://us.archive.ubuntu.com precise-updates InRelease Hit http://us.archive.ubuntu.com precise-backports InRelease Hit http://security.ubuntu.com precise-security InRelease Hit http://us.archive.ubuntu.com precise Release.gpg Hit http://security.ubuntu.com precise-security/main Sources Hit http://us.archive.ubuntu.com precise-updates/main Sources Hit http://us.archive.ubuntu.com precise-updates/restricted Sources Hit http://us.archive.ubuntu.com precise-updates/universe Sources Hit http://us.archive.ubuntu.com precise-updates/multiverse Sources Hit http://us.archive.ubuntu.com precise-updates/main amd64 Packages Hit http://security.ubuntu.com precise-security/restricted Sources Hit http://security.ubuntu.com precise-security/universe Sources Hit http://security.ubuntu.com precise-security/multiverse Sources Hit http://security.ubuntu.com precise-security/main amd64 Packages Hit http://security.ubuntu.com precise-security/restricted amd64 Packages Hit http://us.archive.ubuntu.com precise-updates/restricted amd64 Packages Hit http://us.archive.ubuntu.com precise-updates/universe amd64 Packages Hit http://us.archive.ubuntu.com precise-updates/multiverse amd64 Packages Hit http://us.archive.ubuntu.com precise-updates/main i386 Packages Hit http://us.archive.ubuntu.com precise-updates/restricted i386 Packages Hit http://security.ubuntu.com precise-security/universe amd64 Packages Hit http://security.ubuntu.com precise-security/multiverse amd64 Packages Hit http://security.ubuntu.com precise-security/main i386 Packages Hit http://security.ubuntu.com precise-security/restricted i386 Packages Hit http://security.ubuntu.com precise-security/universe i386 Packages Hit http://security.ubuntu.com precise-security/multiverse i386 Packages Hit http://security.ubuntu.com precise-security/main TranslationIndex Hit http://us.archive.ubuntu.com precise-updates/universe i386 Packages Hit http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages Hit http://us.archive.ubuntu.com precise-updates/main TranslationIndex Hit http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex Hit http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex Hit http://security.ubuntu.com precise-security/restricted TranslationIndex Hit http://security.ubuntu.com precise-security/universe TranslationIndex Hit http://us.archive.ubuntu.com precise-updates/universe TranslationIndex Hit http://us.archive.ubuntu.com precise-backports/main Sources Hit http://us.archive.ubuntu.com precise-backports/restricted Sources Hit http://us.archive.ubuntu.com precise-backports/universe Sources Hit http://us.archive.ubuntu.com precise-backports/multiverse Sources Hit http://us.archive.ubuntu.com precise-backports/main amd64 Packages Hit http://us.archive.ubuntu.com precise-backports/restricted amd64 Packages Hit http://security.ubuntu.com precise-security/main Translation-en Hit http://security.ubuntu.com precise-security/multiverse Translation-en Ign http://get.docker.io docker InRelease Hit http://us.archive.ubuntu.com precise-backports/universe amd64 Packages Hit http://us.archive.ubuntu.com precise-backports/multiverse amd64 Packages Hit http://us.archive.ubuntu.com precise-backports/main i386 Packages Hit http://us.archive.ubuntu.com precise-backports/restricted i386 Packages Hit http://us.archive.ubuntu.com precise-backports/universe i386 Packages Hit http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages Hit http://security.ubuntu.com precise-security/restricted Translation-en Hit http://us.archive.ubuntu.com precise-backports/main TranslationIndex Hit http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex Hit http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex Hit http://us.archive.ubuntu.com precise-backports/universe TranslationIndex Hit http://us.archive.ubuntu.com precise Release Hit http://us.archive.ubuntu.com precise-updates/main Translation-en Hit http://us.archive.ubuntu.com precise-updates/multiverse Translation-en Hit http://us.archive.ubuntu.com precise-updates/restricted Translation-en Hit http://us.archive.ubuntu.com precise-updates/universe Translation-en Hit http://security.ubuntu.com precise-security/universe Translation-en Hit http://us.archive.ubuntu.com precise-backports/main Translation-en Hit http://us.archive.ubuntu.com precise-backports/multiverse Translation-en Hit http://us.archive.ubuntu.com precise-backports/restricted Translation-en Hit http://us.archive.ubuntu.com precise-backports/universe Translation-en Hit http://us.archive.ubuntu.com precise/main Sources Hit http://us.archive.ubuntu.com precise/restricted Sources Hit http://us.archive.ubuntu.com precise/universe Sources Hit http://us.archive.ubuntu.com precise/multiverse Sources Hit http://us.archive.ubuntu.com precise/main amd64 Packages Hit http://us.archive.ubuntu.com precise/restricted amd64 Packages Hit http://us.archive.ubuntu.com precise/universe amd64 Packages Hit http://us.archive.ubuntu.com precise/multiverse amd64 Packages Hit http://us.archive.ubuntu.com precise/main i386 Packages Hit http://us.archive.ubuntu.com precise/restricted i386 Packages Hit http://us.archive.ubuntu.com precise/universe i386 Packages Hit http://us.archive.ubuntu.com precise/multiverse i386 Packages Hit http://us.archive.ubuntu.com precise/main TranslationIndex Hit http://us.archive.ubuntu.com precise/multiverse TranslationIndex Hit http://us.archive.ubuntu.com precise/restricted TranslationIndex Hit http://us.archive.ubuntu.com precise/universe TranslationIndex Hit http://us.archive.ubuntu.com precise/main Translation-en Hit http://us.archive.ubuntu.com precise/multiverse Translation-en Hit http://us.archive.ubuntu.com precise/restricted Translation-en Ign http://get.docker.io docker Release.gpg Hit http://us.archive.ubuntu.com precise/universe Translation-en Ign http://get.docker.io docker Release Ign http://get.docker.io docker/main TranslationIndex Err http://get.docker.io docker/main amd64 Packages Undetermined Error [IP: 52.20.133.232 80] Err http://get.docker.io docker/main i386 Packages Undetermined Error [IP: 52.20.133.232 80] Ign http://get.docker.io docker/main Translation-en_US Ign http://get.docker.io docker/main Translation-en Stderr from the command: stdin: is not a tty W: Failed to fetch http://get.docker.io/ubuntu/dists/docker/main/binary-amd64/Packages Undetermined Error [IP: 52.20.133.232 80] W: Failed to fetch http://get.docker.io/ubuntu/dists/docker/main/binary-i386/Packages Undetermined Error [IP: 52.20.133.232 80] E: Some index files failed to download. They have been ignored, or old ones used instead. |
解決策をぐぐっているとGithub上にIssueが。
https://github.com/mitchellh/vagrant/issues/5748
Issueがあがっていて、活発に議論もされていたので
もしかして:vagrantのバージョンをあげたら解決する
と考えるに至りました。
ということで、
http://www.vagrantup.com/downloads.html
から最新のvagrantをDLしインストール。
事前に下記コマンドで動いているVMを止めました。
1 2 |
vagrant halt |
最新バージョン(1.7.4)をインストールしたうえで、改めてupしてみると無事にVMの起動が確認できました。
めでたしめでたし。
おしまい