Skip to content

Commit 3e3fee6

Browse files
committed
Do not pre-pull cache images
Since 20.18.6 / 2140a2b / drone-plugins#462, buildkit is always enabled. Therefore, there is no need anymore to pre-pull the cached images, `--cache-from` will cause buildkit to pull as needed. This is a slimmed down alternative to drone-plugins#360.
1 parent 2140a2b commit 3e3fee6

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

docker.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,6 @@ func (p Plugin) Exec() error {
230230
cmds = append(cmds, commandVersion()) // docker version
231231
cmds = append(cmds, commandInfo()) // docker info
232232

233-
// pre-pull cache images
234-
for _, img := range p.Build.CacheFrom {
235-
cmds = append(cmds, commandPull(img))
236-
}
237-
238233
// setup for using ssh agent (https://docs.docker.com/develop/develop-images/build_enhancements/#using-ssh-to-access-private-data-in-builds)
239234
if p.Build.SSHAgentKey != "" {
240235
var sshErr error
@@ -363,10 +358,6 @@ func isCommandPull(args []string) bool {
363358
return len(args) > 2 && args[1] == "pull"
364359
}
365360

366-
func commandPull(repo string) *exec.Cmd {
367-
return exec.Command(dockerExe, "pull", repo)
368-
}
369-
370361
func commandLoginEmail(login Login) *exec.Cmd {
371362
return exec.Command(
372363
dockerExe, "login",

0 commit comments

Comments
 (0)