Skip to content

Commit

Permalink
Merge pull request #5064 from dvdksn/docs-add-checksum-https
Browse files Browse the repository at this point in the history
dockerfile: clarify that checksum works with HTTPS
  • Loading branch information
tonistiigi authored Jul 1, 2024
2 parents 2ec1338 + 1730844 commit fa867bc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/dockerfile/dockerfile2llb/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ func dispatchCopy(d *dispatchState, cfg copyConfig) error {
return errors.New("checksum can't be specified for multiple sources")
}
if !isHTTPSource(cfg.params.SourcePaths[0]) {
return errors.New("checksum can't be specified for non-HTTP sources")
return errors.New("checksum can't be specified for non-HTTP(S) sources")
}
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/dockerfile/dockerfile_addchecksum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,6 @@ ADD --checksum=%s foo /tmp/foo
dockerui.DefaultLocalNameContext: dir,
},
}, nil)
require.Error(t, err, "checksum can't be specified for non-HTTP sources")
require.Error(t, err, "checksum can't be specified for non-HTTP(S) sources")
})
}
2 changes: 1 addition & 1 deletion frontend/dockerfile/docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ The `--checksum` flag lets you verify the checksum of a remote resource:
ADD --checksum=sha256:24454f830cdb571e2c4ad15481119c43b3cafd48dd869a9b2945d1036d1dc68d https://mirrors.edge.kernel.org/pub/linux/kernel/Historic/linux-0.01.tar.gz /
```

The `--checksum` flag only supports HTTP sources currently.
The `--checksum` flag only supports HTTP(S) sources.

### ADD --chown --chmod

Expand Down

0 comments on commit fa867bc

Please sign in to comment.