...
|
...
|
@@ -54,6 +54,9 @@ func Tar(path string, compression Compression) (io.Reader, error) {
|
54
|
54
|
func Untar(archive io.Reader, path string) error {
|
55
|
55
|
cmd := exec.Command("bsdtar", "-f", "-", "-C", path, "-x")
|
56
|
56
|
cmd.Stdin = archive
|
|
57
|
+ // Hardcode locale environment for predictable outcome regardless of host configuration.
|
|
58
|
+ // (see https://github.com/dotcloud/docker/issues/355)
|
|
59
|
+ cmd.Env = []string{"LANG=en_US.utf-8", "LC_ALL=en_US.utf-8"}
|
57
|
60
|
output, err := cmd.CombinedOutput()
|
58
|
61
|
if err != nil {
|
59
|
62
|
return fmt.Errorf("%s: %s", err, output)
|