Skip to content

Commit 410c0ba

Browse files
authored
Merge pull request #5992 from thaJeztah/migrate_archive
migrate to use github.com/moby/go-archive
2 parents 6714b50 + 342a01a commit 410c0ba

43 files changed

Lines changed: 249 additions & 251 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cli/command/container/cp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
"github.com/docker/cli/cli/command"
1717
"github.com/docker/cli/cli/streams"
1818
"github.com/docker/docker/api/types/container"
19-
"github.com/docker/docker/pkg/archive"
2019
units "github.com/docker/go-units"
20+
"github.com/moby/go-archive"
2121
"github.com/morikuni/aec"
2222
"github.com/pkg/errors"
2323
"github.com/spf13/cobra"

cli/command/container/cp_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
"github.com/docker/cli/internal/test"
1212
"github.com/docker/docker/api/types/container"
13-
"github.com/docker/docker/pkg/archive"
13+
"github.com/moby/go-archive"
1414
"gotest.tools/v3/assert"
1515
is "gotest.tools/v3/assert/cmp"
1616
"gotest.tools/v3/fs"

cli/command/image/build.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ import (
2929
"github.com/docker/docker/api/types/container"
3030
registrytypes "github.com/docker/docker/api/types/registry"
3131
"github.com/docker/docker/builder/remotecontext/urlutil"
32-
"github.com/docker/docker/pkg/archive"
33-
"github.com/docker/docker/pkg/idtools"
3432
"github.com/docker/docker/pkg/progress"
3533
"github.com/docker/docker/pkg/streamformatter"
34+
"github.com/moby/go-archive"
3635
"github.com/pkg/errors"
3736
"github.com/spf13/cobra"
3837
)
@@ -269,7 +268,7 @@ func runBuild(ctx context.Context, dockerCli command.Cli, options buildOptions)
269268
excludes = build.TrimBuildFilesFromExcludes(excludes, relDockerfile, options.dockerfileFromStdin())
270269
buildCtx, err = archive.TarWithOptions(contextDir, &archive.TarOptions{
271270
ExcludePatterns: excludes,
272-
ChownOpts: &idtools.Identity{UID: 0, GID: 0},
271+
ChownOpts: &archive.ChownOpts{UID: 0, GID: 0},
273272
})
274273
if err != nil {
275274
return err

cli/command/image/build/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ import (
1515
"time"
1616

1717
"github.com/docker/docker/builder/remotecontext/git"
18-
"github.com/docker/docker/pkg/archive"
1918
"github.com/docker/docker/pkg/ioutils"
2019
"github.com/docker/docker/pkg/progress"
2120
"github.com/docker/docker/pkg/streamformatter"
2221
"github.com/docker/docker/pkg/stringid"
22+
"github.com/moby/go-archive"
2323
"github.com/moby/patternmatcher"
2424
"github.com/pkg/errors"
2525
)

cli/command/image/build/context_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"strings"
1111
"testing"
1212

13-
"github.com/docker/docker/pkg/archive"
13+
"github.com/moby/go-archive"
1414
"github.com/moby/patternmatcher"
1515
"gotest.tools/v3/assert"
1616
is "gotest.tools/v3/assert/cmp"

cli/command/image/build_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"github.com/docker/cli/cli/streams"
1515
"github.com/docker/cli/internal/test"
1616
"github.com/docker/docker/api/types"
17-
"github.com/docker/docker/pkg/archive"
1817
"github.com/google/go-cmp/cmp"
18+
"github.com/moby/go-archive"
1919
"gotest.tools/v3/assert"
2020
"gotest.tools/v3/fs"
2121
"gotest.tools/v3/skip"

cli/command/plugin/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/docker/cli/cli/command"
1313
"github.com/docker/cli/cli/command/completion"
1414
"github.com/docker/docker/api/types"
15-
"github.com/docker/docker/pkg/archive"
15+
"github.com/moby/go-archive"
1616
"github.com/pkg/errors"
1717
"github.com/sirupsen/logrus"
1818
"github.com/spf13/cobra"

vendor.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ require (
2626
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
2727
github.com/google/uuid v1.6.0
2828
github.com/mattn/go-runewidth v0.0.16
29+
github.com/moby/go-archive v0.0.0-20250404171912-21f3f3385ab7
2930
github.com/moby/patternmatcher v0.6.0
3031
github.com/moby/swarmkit/v2 v2.0.0-20250103191802-8c1959736554
3132
github.com/moby/sys/atomicwriter v0.1.0
@@ -61,7 +62,6 @@ require (
6162
)
6263

6364
require (
64-
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 // indirect
6565
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
6666
github.com/Microsoft/go-winio v0.6.2 // indirect
6767
github.com/beorn7/perks v1.0.1 // indirect

vendor.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ github.com/mitchellh/mapstructure v1.0.0 h1:vVpGvMXJPqSDh2VYHF7gsfQj8Ncx+Xw5Y1KH
165165
github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
166166
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
167167
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
168+
github.com/moby/go-archive v0.0.0-20250404171912-21f3f3385ab7 h1:CWAY9uG9JhmLmnM7T64+bV0C9IraDrvxEwXq1HJ7hhk=
169+
github.com/moby/go-archive v0.0.0-20250404171912-21f3f3385ab7/go.mod h1:G9B+YoujNohJmrIYFBpSd54GTUB4lt9S+xVQvsJyFuo=
168170
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=
169171
github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=
170172
github.com/moby/swarmkit/v2 v2.0.0-20250103191802-8c1959736554 h1:DMHJbgyNZWyrPKYjCYt2IxEO7KA0eSd4fo6KQsv2W84=

vendor/github.com/docker/docker/pkg/idtools/idtools.go

Lines changed: 0 additions & 194 deletions
This file was deleted.

0 commit comments

Comments
 (0)