我正试图在vagrant 1.6中测试新的docker支持.我在Windows上,我设置了我的流浪文件但是当我运行"vagrant up --provider = docker"时,我得到以下内容:
Bringing machine 'default' up with 'docker' provider...
==> default: Docker host is required. One will be created if necessary...
default: Vagrant will now create or start a local VM to act as the Docker
default: host. You'll see the output of the `vagrant up` for this VM below.
default:
default: Box 'mitchellh/boot2docker' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
default: Loading metadata for …Run Code Online (Sandbox Code Playgroud) 我在 Ubuntu 12.04.2 LTS 中安装了 vagrant 和 virtual box。(流浪者版本1.2.1)。我已经下载了 vagrant box 并执行了 vagrant box add 命令。我收到以下错误:
*vagrant box add base64 package.box
Downloading or copying the box...
Extracting box...te: 147M/s, Estimated time remaining: 0:00:01)
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and try again. The
output from attempting to unpackage (if any):
x ./box-disk1.vmdk: Write failed
x ./box.ovf: Write failed
x ./Vagrantfile: Write failed
bsdtar: Error exit delayed from …Run Code Online (Sandbox Code Playgroud) 这不起作用:
$ tar -cf /tmp/z.tar -C /space/myroot -s '/^\.svn\/patches/__patches' src .svn/patches
tar: Invalid regular expression: trailing backslash (\)
Run Code Online (Sandbox Code Playgroud)
也没有好处:
$ tar -cf /tmp/z.tar -C /space/myroot -s '/^\\.svn\\/patches/__patches' src .svn/patches
tar: Invalid replacement flag _
Run Code Online (Sandbox Code Playgroud)
反斜杠(最多 4 个)和引号的每种组合都会给我带来这两个错误之一。不过我知道第一个在 sed 中有效:
$ tar -cf /tmp/z.tar -C /space/myroot src .svn/patches
$ tar -tf /tmp/z.tar | sed 's/^\.svn\/patches/__patches/'
src/a.c
src/b.c
__patches/A.patch
__patches/B.patch
Run Code Online (Sandbox Code Playgroud)
我也知道我可以逃避并这样做:
$ tar -cf /tmp/z.tar -C /space/myroot -s '/^.svn.patches/__patches' src .svn/patches
Run Code Online (Sandbox Code Playgroud)
——但我真的不想这么做。