Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use archive.CopyWithTar in vfs.Create#8802

Merged
unclejack merged 1 commit into
moby:masterfrom
jlhawn:vfs_copydir_use_archive_copywithtar
Oct 27, 2014
Merged

Use archive.CopyWithTar in vfs.Create#8802
unclejack merged 1 commit into
moby:masterfrom
jlhawn:vfs_copydir_use_archive_copywithtar

Conversation

@jlhawn

@jlhawn jlhawn commented Oct 27, 2014

Copy link
Copy Markdown

The vfs storage driver currently shells out to the cp binary on the host
system to perform an 'archive' copy of the base image to a new directory.
The archive option preserves the modified time of the files which are created
but there was an issue where it was unable to preserve the modified time of
copied symbolic links on some host systems with an outdated version of cp.

This change no longer relies on the host system implementation and instead
utilizes the CopyWithTar function found in pkg/archive which is used
to copy from source to destination directory using a Tar archive, which
should correctly preserve file attributes.

Docker-DCO-1.1-Signed-off-by: Josh Hawn [email protected] (github: jlhawn)

The vfs storage driver currently shells out to the `cp` binary on the host
system to perform an 'archive' copy of the base image to a new directory.
The archive option preserves the modified time of the files which are created
but there was an issue where it was unable to preserve the modified time of
copied symbolic links on some host systems with an outdated version of `cp`.

This change no longer relies on the host system implementation and instead
utilizes the `CopyWithTar` function found in `pkg/archive` which is used
to copy from source to destination directory using a Tar archive, which
should correctly preserve file attributes.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <[email protected]> (github: jlhawn)
@jlhawn

jlhawn commented Oct 27, 2014

Copy link
Copy Markdown
Author

see #8249 (comment) for discussion on this.

@crosbymichael, @vieux, @jfrazelle, @tiborvass, @unclejack, et al, please review!

@jessfraz

Copy link
Copy Markdown
Contributor

LGTM

@vieux

vieux commented Oct 27, 2014

Copy link
Copy Markdown
Contributor

ping @unclejack

@unclejack

Copy link
Copy Markdown
Contributor

LGTM

unclejack added a commit that referenced this pull request Oct 27, 2014
@unclejack unclejack merged commit 039f225 into moby:master Oct 27, 2014
@jlhawn jlhawn deleted the vfs_copydir_use_archive_copywithtar branch November 4, 2014 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants