前人未踏の領域へ アプリ開発編

Android, iOSアプリ開発に関する調査メモ置き場。ほとんどAndroid。はてなダイアリーから移行したため古い記事にはアプリ以外も含まれます。

boxコマンドあれこれ

ヘルプ

$ vagrant help box
Usage: vagrant box <subcommand> [<args>]

Available subcommands:
     add
     list
     outdated
     remove
     repackage
     update

For help on any individual subcommand run `vagrant box <subcommand> -h`

box list

リスト表示

$ vagrant box list
ubuntu/trusty64 (virtualbox, 14.04)

box add

以下を参考にboxを追加。
https://atlas.hashicorp.com/boxes/search?utm_source=vagrantcloud.com&vagrantcloud=1

$ vagrant box add ubuntu/trusty64
==> box: Loading metadata for box 'ubuntu/trusty64'
    box: URL: https://atlas.hashicorp.com/ubuntu/trusty64
==> box: Adding box 'ubuntu/trusty64' (v14.04) for provider: virtualbox
    box: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/14.04/providers/virtualbox.box
==> box: Successfully added box 'ubuntu/trusty64' (v14.04) for 'virtualbox'!

box remove

boxを削除

$ vagrant box remove ubuntu/trusty64
Box 'ubuntu/trusty64' (v14.04) with provider 'virtualbox' appears
to still be in use by at least one Vagrant environment. Removing
the box could corrupt the environment. We recommend destroying
these environments first:

default (ID: 3e8669241ec049d797d60572f871ff02)

Are you sure you want to remove this box? [y/N] y
Removing box 'ubuntu/trusty64' (v14.04) with provider 'virtualbox'...

更新

$ vagrant box update ubuntu/trusty64