Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
e907d54
Move pkg/gitutils to remotecontext/git
dnephin Jun 1, 2017
a6cc6cd
Fix handling of remote "git@" notation
thaJeztah Jun 15, 2017
9450481
Move IsGitTransport() to gitutils
thaJeztah Jun 26, 2017
e9831d7
Fix shallow git clone in docker-build
ecnerwala Jun 15, 2017
e2cc22d
gitutils: fix checking out submodules
tonistiigi Dec 7, 2017
7bc5033
gitutils: remove checkout directory on error
tonistiigi Dec 8, 2017
6ea4877
Add canonical import comment
dnephin Feb 5, 2018
242f176
Automated migration using
dnephin Mar 13, 2018
db857b5
Post migration assertion fixes
dnephin Dec 22, 2017
71672ec
Update tests to use gotest.tools 👼
vdemeester Jun 11, 2018
84c375f
Merge pull request #37243 from vdemeester/gotestyourself-with-tools
Jun 13, 2018
04e2a24
gitutils: add validation for ref
tonistiigi Feb 6, 2019
80dd489
Merge pull request #38944 from andrewhsu/gitutils
thaJeztah Mar 27, 2019
70aef9f
gosec: add ignore comments for reported issues that can be ignored
thaJeztah Aug 28, 2019
b3d0327
Merge pull request #39668 from thaJeztah/replace_gometalinter
yongtang Sep 18, 2019
a0d9b0c
TestParseRemoteURL: use subtests
thaJeztah Nov 5, 2019
2d0d4ce
builder/remotecontext: use net/url instead of urlutil
thaJeztah Nov 5, 2019
ea85037
builder/remotecontext: allow ssh:// urls for remote context
thaJeztah Nov 5, 2019
5896d38
bump gotest.tools v3.0.1 for compatibility with Go 1.14
thaJeztah Feb 7, 2020
a4c8c72
replace pkg/symlink with github.com/moby/sys/symlink
thaJeztah Oct 29, 2020
613477b
Merge pull request #41606 from thaJeztah/moby_sys_symlink
tiborvass Nov 3, 2020
389ada7
Use golang.org/x/sys/execabs
Jan 25, 2021
6d2a901
refactor: move from io/ioutil to io and os package
Juneezee Aug 24, 2021
9e39630
pkg/urlutil: deprecate, and move to builder/remotecontext/urlutil
thaJeztah Apr 10, 2022
26a1136
builder/remotecontext/urlutil: simplify and improve documentation
thaJeztah Apr 10, 2022
f1b0ef1
Merge pull request #43477 from thaJeztah/deprecate_urlutil
thaJeztah Apr 13, 2022
a12090d
gofmt GoDoc comments with go1.19
thaJeztah Jul 8, 2022
3f4cc89
builder: modernize TestCheckoutGit
corhere Jul 27, 2022
3bfb30a
builder: explicitly set CWD for all git commands
corhere Jul 27, 2022
876fc1d
builder: isolate git from local system
corhere Jul 28, 2022
bcd6c45
builder: make git config isolation opt-in
corhere Oct 13, 2022
212213e
builder: fix running git commands on Windows
corhere Oct 20, 2022
5c21ec5
builder: add missing doc comment
corhere Oct 20, 2022
6671338
builder/remotecontext/git: allow building on go1.18
thaJeztah Oct 21, 2022
aa6ad06
Merge pull request #44344 from thaJeztah/go1.18_compat
thaJeztah Oct 21, 2022
60b326f
builder/remotecontext/gitutils: switch back to os/exec
thaJeztah Nov 9, 2022
6291744
builder/remotecontext/git: use strings.Cut()
thaJeztah Oct 31, 2022
ee957e1
Merge pull request #44381 from thaJeztah/strings_cut
tianon Dec 21, 2022
8f86518
builder/remotecontext: format code with gofumpt
thaJeztah Jan 20, 2022
52c62bd
Fix isGitURL regular expression
whalelines Jan 18, 2024
ce63915
Merge pull request #47109 from whalelines/git-url-regex
tianon Jan 18, 2024
45f09a1
builder/remotecontext/git: remove redundant capturing of loop vars (c…
thaJeztah Nov 12, 2024
8d3c0fb
tests: migrate to assert.ErrorContains when possible
cyphar Nov 22, 2024
75f791d
builder: use lazyregexp to compile regexes on first use
thaJeztah Jul 15, 2024
a10a1e6
builder/remotecontext: remove unused named and "naked" returns
thaJeztah Dec 28, 2023
09a3c93
fix(QF1001): Apply De Morgan’s law
mmorel-35 Apr 27, 2025
7422403
Merge pull request #49885 from mmorel-35/fix-staticcheck
thaJeztah May 1, 2025
342f8bc
builder: remove // import comments
thaJeztah May 30, 2025
3b25977
Merge pull request #50110 from thaJeztah/remove_import_comments
thaJeztah May 30, 2025
8d2ccc1
add local fork of github.com/docker/docker/builder/remotecontext
thaJeztah Jul 16, 2025
e346165
fix linting issues
thaJeztah Jul 16, 2025
b05aa46
Dockerfile: install git-daemon for use in tests
thaJeztah Jul 16, 2025
64f33cd
TestCloneArgsSmartHttp: fix unhandled error
thaJeztah Jul 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS build-base-alpine
ENV GOTOOLCHAIN=local
COPY --link --from=xx / /
RUN apk add --no-cache bash clang lld llvm file git
RUN apk add --no-cache bash clang lld llvm file git git-daemon
WORKDIR /go/src/github.com/docker/cli

FROM build-base-alpine AS build-alpine
Expand Down
2 changes: 1 addition & 1 deletion cli/command/image/build/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"strings"
"time"

"github.com/docker/docker/builder/remotecontext/git"
"github.com/docker/cli/cli/command/image/build/internal/git"
"github.com/docker/docker/pkg/progress"
"github.com/docker/docker/pkg/streamformatter"
"github.com/moby/go-archive"
Expand Down
2 changes: 1 addition & 1 deletion cli/command/image/build/context_detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/docker/docker/builder/remotecontext/urlutil"
"github.com/docker/cli/cli/command/image/build/internal/urlutil"
)

// ContextType describes the type (source) of build-context specified.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ func supportsShallowClone(remoteURL string) bool {

// Try a HEAD request and fallback to a Get request on error
res, err := http.Head(serviceURL) // #nosec G107
if err == nil {
_ = res.Body.Close()
}
if err != nil || res.StatusCode != http.StatusOK {
res, err = http.Get(serviceURL) // #nosec G107
if err == nil {
Expand Down
Loading
Loading