Commit Graph

142 Commits (master)

Author SHA1 Message Date
Justin Chadwell 3ce17b01dc inspect: provide access to multiple spdx documents
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell e68c566c1c inspect: parse sbom and provenance into json structs
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell 19d16aa941 inspect: break after first matching attestation
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
CrazyMax e6b9aba997
imagetools inspect: handle provenance and sbom
use stub structs for SLSA/SBOM while waiting for
go-imageinspect library to be public.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax 2fb9db994b
imagetools inspect: missing annotations key
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
Tõnis Tiigi 64e4c19971
Merge pull request #1477 from crazy-max/git-wsl
build: lookup the right git binary on WSL
2 years ago
CrazyMax 0d1fea8134
build: warn if git operation fails
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax 19417e76e7
build: lookup the right git binary on WSL
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
Justin Chadwell f992b77535 buildflags: warn on duplicate attest field
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
CrazyMax 6ad5e2fcf3
build: set provenance vcs details
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
Justin Chadwell b270a20274 build: add attests flag and sbom/provenance shorthands
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
CrazyMax 63073b65c0
dockerutil pkg to manage docker api client and context
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax 2245371696
Merge pull request #1420 from jedevc/oci-tar
Support new `tar` option for oci+docker exporters
2 years ago
CrazyMax ae59e1f72e
Merge pull request #1305 from jedevc/progress-group-prefixed-writer
progress: add prefix to vertex progress group
2 years ago
Justin Chadwell e6b09580b4 build: support tar flag for oci+docker exporters
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Tõnis Tiigi aa1f4389b1
Merge pull request #1396 from crazy-max/fix-indent
use double spaces with json marshal indent
2 years ago
Felix de Souza b68114375f
Address feedback
Signed-off-by: Felix de Souza <fdesouza@palantir.com>
2 years ago
Felix de Souza 83a09b3cf2
Synchronise access to the map when printing.
Signed-off-by: Felix de Souza <fdesouza@palantir.com>
2 years ago
CrazyMax abebf4d955
use double spaces with json marshal indent
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
Justin Chadwell a50e89c38e progress: explicitly fail if tty requested but not available
The NewPrinter function is mostly borrowed from buildkit. However, at
some point, it seems that the implementations drifted.

This patch updates buildx to be more similar in behavior to it's
buildkit counterpart, specifically, it will explicitly fail if a TTY
output is requested using "--progress=tty", but the output is not
available.

To gracefully fallback to plain progress in this scenario,
"--progress=plain" is required.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell 0566e62995 progress: add prefix to vertex progress group
As buildkit now uses progress groups for the COPY --link instruction
we need to ensure that we additionally prefix the progress group name,
or the target name will be left off in bake commands with more than one
target.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
CrazyMax 57d22a7bd1
s3 cache client-side support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax 2a13491919
Dockerfile: update golangci-lint to 1.48.0 (go 1.19 support)
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
Justin Chadwell f1a9f91323 imagetools: support cross-repo mounting
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell 4ecca34a42 imagetools: give imagetools create a progress bar
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell 37ca8631f9 imagetools: copy manifests between repositories
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell d3412f1039 imagetools: refactor combining repository logic
This patch modifies the existing combining code in imagetools create to
provide better support for multiple repositories down the road.
Specifically, the code should no longer rely on a single repository
being used for all sources and tags, and should resolve descriptors in
their relevant repositories.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Tonis Tiigi e4137b2eea imagetools: handle manifest with nil platform
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
3 years ago
CrazyMax 8257a04a7d
create: load default buildkit config if none specified
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
3 years ago
Tõnis Tiigi 3adca1c17d
Merge pull request #995 from thaJeztah/replace_ioutil
Remove uses of deprecated io/ioutil
3 years ago
CrazyMax 38311a35f2
imagetools inspect: use buildinfo helper
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
3 years ago
Sebastiaan van Stijn fc7ba75fd7
Remove uses of deprecated io/ioutil
The package has been deprecated since Go 1.16: https://go.dev/doc/go1.16#ioutil

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
3 years ago
Tõnis Tiigi 9fcea76dea
Merge pull request #977 from tonistiigi/logs-dupes
progress: avoid double logs when multiple targets build same step
3 years ago
CrazyMax 215a128fc1
imagetools inspect: missing manifest digest for manifest-list (json)
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
3 years ago
CrazyMax 4e4eea7814
imagetools inspect: deterministic platform order
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
3 years ago
Tonis Tiigi b77d7864fa progress: avoid double logs when multiple targets build same step
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
3 years ago
CrazyMax 20a55e9184
imagetools inspect: multi-platform support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
3 years ago
CrazyMax 6c56109083
imagetools inspect: add --format flag
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
3 years ago
Tõnis Tiigi 60a025b227
Merge pull request #928 from tonistiigi/bake-named-contexts
bake: add named contexts keys
3 years ago
Edgar Lee 2d7540fb0a Separate io.Writer from console.File for NewPrinter
Signed-off-by: Edgar Lee <edgarl@netflix.com>
3 years ago
Tonis Tiigi ffa062dc95 util: add waitmap for target synchronization
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
3 years ago
CrazyMax d3e56ea9d9
root: simple output format on logrus for parity with cli
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
3 years ago
CrazyMax 278f94a8b6
root: filter out useless commandConn.CloseWrite warning message
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
3 years ago
Tonis Tiigi 038727477c root: filter out useless debug logs from vendored packages
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
3 years ago
Tonis Tiigi ed4103ef52 commands: build summary of warnings on build
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
3 years ago
Tonis Tiigi 9c3be32bc9 vendor: update buildkit to 539be170
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
3 years ago
Tõnis Tiigi 62bdf4d85e
Merge pull request #868 from crazy-max/discard-containerd-logger
imagetools resolver: discard containerd logger output
3 years ago
CrazyMax 5c5125f30e
imagetools resolver: fix deprecated client opt
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
3 years ago
CrazyMax e9cf2cbe32
imagetools resolver: discard containerd logger output
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
3 years ago
CrazyMax eab0e6a8fe
cli: fix builder persistent flag
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
3 years ago
Tonis Tiigi c62472121b allow multi-node push and imagetools to use custom registry config
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
3 years ago
Tonis Tiigi 88d0775692 refactor accessing registry configs via drivers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
3 years ago
Tõnis Tiigi 8afc82b427
Merge pull request #817 from tonistiigi/project-sharedkey
build: set local sharedkey per project basename
3 years ago
Tonis Tiigi 4c1621cccd store snapshot of config files on create
Files can be reused when container needs to be booted again.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
3 years ago
Tonis Tiigi aa52a5a699 build: set local sharedkey per project basename
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
3 years ago
Tõnis Tiigi 49342dd54d
Merge pull request #787 from crazy-max/inject-certs
container driver: copy ca and user tls registries certs
3 years ago
CrazyMax 3f716f00fa
container driver: copy ca and user tls registries certs
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
3 years ago
Tonis Tiigi b497587f21 imagetools: fix pushing same image with multiple names
containerd pusher can’t handle this case atm so we
need to make sure we always create a new resolver
for each name.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
3 years ago
Tonis Tiigi 6fc906532b bake: fix using push override with output definition
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
3 years ago
Tonis Tiigi 9d88450118 enable opentelemetry support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
4 years ago
Tõnis Tiigi 03b7128b60
Merge pull request #575 from tonistiigi/user-func-vars
bake: allow user functions in variables and vice-versa
4 years ago
Tonis Tiigi df7a318ec0 bake: allow user functions in variables and vice-versa
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
4 years ago
Tõnis Tiigi 908a856079
Merge pull request #590 from AkihiroSuda/split-flagparser
build: split buildflags package
4 years ago
Akihiro Suda 399df854ea
build: split buildflags package
Planned to be imported by nerdctl in future.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
4 years ago
Tonis Tiigi 328441cdc6 imagetools: fix merging JSON descriptor with old one
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
4 years ago
Tonis Tiigi 83868a48b7 temp local copy of userfunc
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
4 years ago
Ulysses Souza 55d5b80dfe Add quiet mode to progress printer
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
4 years ago
Tonis Tiigi dba79ba223 update lint to go1.16/golangci
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
4 years ago
Tonis Tiigi f68f42cb11 build: add push support to docker driver
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
4 years ago
Tonis Tiigi 40fad4bbb5 progress: make sure all channels have written before returning
Possible write on closed channel on cancellation before.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
4 years ago
Tonis Tiigi 1496ac9b55 util: simplify progress syncronization
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
4 years ago
Tonis Tiigi 378bf70d4b refactor driver auth for easier passing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
4 years ago
Tonis Tiigi 3b69482a2f docker-container: ensure credentials are passed when pulling buildkit image
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
4 years ago
Tibor Vass c4d07f67e3 commands: check if flag is set instead of using flagutil.Tristate
Fixes --pull and --no-cache without argument

Signed-off-by: Tibor Vass <tibor@docker.com>
5 years ago
Tonis Tiigi 4804824c78 separate manual and automatically detected platforms
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
5 years ago
Tibor Vass 2a257a8252 bake: allow overriding no-cache and pull per target via --set
Signed-off-by: Tibor Vass <tibor@docker.com>
5 years ago
ulyssessouza 3d630c6f7f Replace usage of *os.File by console.File interface on printer
Signed-off-by: ulyssessouza <ulyssessouza@gmail.com>
5 years ago
Tõnis Tiigi 84f7e9d02d
Merge pull request #70 from tonistiigi/local-platform
platformutil: add local platform
6 years ago
Tõnis Tiigi dcd8ca9308
Merge pull request #69 from tonistiigi/progress-env
progress: add env config
6 years ago
Tonis Tiigi 13b74e0d80 platformutil: add local platform
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6 years ago
Tonis Tiigi 9b57f9e872 imagetools: keep arm variant
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6 years ago
Tonis Tiigi f8e8f17f4e progress: add env config
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6 years ago
Tonis Tiigi 38889013af build: fix push-by-digest for multi-node
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6 years ago
Tonis Tiigi 0398fa337b build: multi-node build support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6 years ago
Tonis Tiigi 96b1892b63 imagetools: push support for create
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6 years ago
Tonis Tiigi 80ad78e372 imagetools: add create support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6 years ago
Tonis Tiigi e40318e2cc commands: add platforms dedupe
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6 years ago
Tonis Tiigi e773d0eb2a util: add platformutil
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6 years ago
Tonis Tiigi cac37434aa build: add docker output for non-moby drivers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6 years ago
Tonis Tiigi 0a28ec6f38 imagetools: implement inspect for manifest list
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6 years ago
Tonis Tiigi a932d52e35 bake: initial implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6 years ago
Tonis Tiigi a6d893efca driver: add logging support to bootstrap
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6 years ago