Commit Graph

9 Commits

Author SHA1 Message Date
John Howard 8228ee4b0f Windows: Archive package changes for Windows daemon
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-20 08:55:54 -07:00
Tianon Gravi 576985a1dc Finally remove our copy of "archive/tar" now that Go 1.4 is the minimum!
IT'S ABOUT TIME. 🎉

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-05-01 16:01:10 -06:00
Mitch Capper b7dc9040f0 Change windows default permissions to 755 not 711, read access for all poses little security risk and prevents breaking existing Dockerfiles
Signed-off-by: Mitch Capper <mitch.capper@gmail.com>
2015-03-20 21:54:33 -07:00
Tibor Vass a6ddb8de42 Merge pull request #11148 from ahmetalpbalkan/win-cli/chmod-x-fix
pkg/archive: adjust chmod bits on windows
2015-03-06 12:28:58 -05:00
Ahmet Alp Balkan 8ba64b383d pkg/archive_windows: make use of os.PathSeparator
cc: @jhowardmsft

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-05 17:15:11 -08:00
Ahmet Alp Balkan 1a22418f9f pkg/archive: adjust chmod bits on windows
This change modifies the chmod bits of build context archives built on
windows to preserve the execute bit and remove the r/w bits from
grp/others.

Also adjusted integ-cli tests to verify permissions based on the platform
the tests are running.

Fixes #11047.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-04 14:10:37 -08:00
Ahmet Alp Balkan 5ecab9e831 Support windows style dockerfile paths for build cmd
Currently TestBuildRenamedDockerfile fails since passing
custom dockerfile paths like:

    docker build -f dir/file .

fails on windows because those are unix paths. Instead, on
windows accept windows style paths like:

    docker build -f dir\file .

and convert them to unix style paths using the helper we
have in `pkg/archive` so that daemon can correctly locate
the path in the context.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-24 20:23:53 -08:00
Ahmet Alp Balkan 28842d3f09 pkg/archive: Canonicalize stored paths
Currently pkg/archive stores nested windows files with
backslashes (e.g. `dir\`, `dir\file.txt`) and this causes
tar not being correctly extracted on Linux daemon.

This change assures we canonicalize all paths to unix
paths and add them to tar with that name independent of platform.

Fixes the following test cases for Windows CI:
- TestBuildAddFileWithWhitespace
- TestBuildCopyFileWithWhitespace
- TestBuildAddDirContentToRoot
- TestBuildAddDirContentToExistingDir
- TestBuildCopyDirContentToRoot
- TestBuildCopyDirContentToExistDir
- TestBuildDockerignore
- TestBuildEnvUsage
- TestBuildEnvUsage2

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-17 16:51:04 -08:00
Ahmet Alp Balkan 2180aa4f6f Refactor pkg/archive with a platform-independent stat struct
pkg/archive contains code both invoked from cli (cross platform) and
daemon (linux only) and Unix-specific dependencies break compilation on
Windows. We extracted those stat-related funcs into platform specific
implementations at pkg/system and added unit tests.

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
2014-11-14 18:20:54 -08:00