container's / must be compressed under 'rootfs' dir

This commit is contained in:
Holger Amann 2013-08-12 11:31:55 +02:00 committed by Fabio Rehm
parent 8fcb6d2a06
commit 5c53e52ea1

View file

@ -106,7 +106,7 @@ module Vagrant
Dir.chdir base_path do Dir.chdir base_path do
@logger.info "Compressing '#{rootfs_path}' rootfs to #{target_path}" @logger.info "Compressing '#{rootfs_path}' rootfs to #{target_path}"
@sudo_wrapper.run('rm', '-f', 'rootfs.tar.gz') @sudo_wrapper.run('rm', '-f', 'rootfs.tar.gz')
@sudo_wrapper.run('tar', '--numeric-owner', '-czf', target_path, '-C', rootfs_path.to_s, '.') @sudo_wrapper.run('tar', '--numeric-owner', '-czf', target_path, 'rootfs')
@logger.info "Changing rootfs tarbal owner" @logger.info "Changing rootfs tarbal owner"
@sudo_wrapper.run('chown', "#{ENV['USER']}:#{ENV['USER']}", target_path) @sudo_wrapper.run('chown', "#{ENV['USER']}:#{ENV['USER']}", target_path)