Commit Graph

2155 Commits

Author SHA1 Message Date
dependabot[bot]
f6a84289eb
Bump github.com/spf13/cobra from 1.2.1 to 1.3.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-15 09:33:22 +00:00
Daniel J Walsh
2689eb367f
Merge pull request #1526 from containers/dependabot/go_modules/github.com/docker/docker-20.10.12incompatible
Bump github.com/docker/docker from 20.10.11+incompatible to 20.10.12+incompatible
2021-12-14 15:07:33 -05:00
dependabot[bot]
c5b45c6c49
Bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.11+incompatible to 20.10.12+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.11...v20.10.12)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-14 09:33:41 +00:00
Miloslav Trmač
037f518146
Merge pull request #1520 from Jamstah/preserve-digests
Add option to preserve digests on copy and sync
2021-12-10 17:06:53 +01:00
James Hewitt
c582c4844f Add option to preserve digests on copy
When enabled, if digests can't be preserved an error will be raised.

Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
2021-12-07 13:16:10 +00:00
James Hewitt
2046bfdaaa Add option to preserve digests on copy
When enabled, if digests can't be preserved an error will be raised.

Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
2021-12-07 13:16:10 +00:00
Daniel J Walsh
25868f17c0
Merge pull request #1523 from cgwalters/proxy-config-2
proxy: Add a GetFullConfig method
2021-12-07 06:33:55 -05:00
Colin Walters
e7dc5e79f2 proxy: Also bump compatible semver
To denote we have new API.
2021-12-06 20:59:17 -05:00
Colin Walters
3606b2d1de proxy: Add a GetFullConfig method
Sadly...I swear I had tested this at one point, but it was
*definitely* not the intention that we just return the container
runtime configuration.

I need a method to return the full image configuration.  At some point
I must have accidentally added a redundant `.Config`.

This whole new method `GetFullConfig` is like `GetConfig` but
returns the whole image configuration.  A specific motivation
here is that it's only in the image configuration that we can
stick arbitrary metadata (labels) that will survive a round trip through
docker schema v2.
2021-12-06 17:15:46 -05:00
Daniel J Walsh
f03d0401c1
Merge pull request #1521 from mtrmac/image-spec
Update opencontainers/image-spec
2021-12-02 13:51:26 -05:00
Miloslav Trmač
5c82c7728f Update github.com/containerd/containerd to v1.5.8
just to keep various dependency checkers happy.

> go get github.com/containerd/containerd@v1.5.8

NOTE: This is NOT a fix for CVE-2021-41190 / GHSA-77vh-xpmg-72qh ,
that was fixed in Skopeo 1.5.2.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-12-02 19:03:33 +01:00
Miloslav Trmač
37d801c90b Update opencontainers/image-spec
... to a version past 1.0.2, just to keep various
dependency checkers happy.

> go get github.com/opencontainers/image-spec@v1.0.2-0.20211123152302-43a7dee1ec31

The commit is intended to match https://github.com/containers/image/pull/1419
to minimize churn.

NOTE: This is NOT a fix for CVE-2021-41190 / GHSA-77vh-xpmg-72qh ,
that was fixed in Skopeo 1.5.2.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-12-02 18:56:36 +01:00
Miloslav Trmač
c3f65951bc
Merge pull request #1511 from Jamstah/copy-sparse-manifest
Add an option to allow copying image indexes alone
2021-12-02 14:38:27 +01:00
James Hewitt
d94015466f Add an option to allow copying image indexes alone
The new --multi-arch option allows the user to select between copying the
image associated with the system platform, all images in the index, or
just the index itself without attempting to copy the images.

Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
2021-11-27 15:38:42 +00:00
Miloslav Trmač
1d24e657fa
Merge pull request #1518 from Jamstah/int-test-ignore
Stop test producing output in source directory
2021-11-27 16:13:31 +01:00
James Hewitt
4dcd28df92 Use a dynamic temp dir for test
This test was incorrectly assuming that nothing would be made on disk,
but it was putting files into the source directory.

Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
2021-11-27 13:44:28 +00:00
Miloslav Trmač
789ee8bea9 Bump to 1.5.3-dev 2021-11-26 11:49:38 -05:00
Miloslav Trmač
8a88191c84 Release 1.5.2
Includes a fix for CVE-2021-41190 / GHSA-77vh-xpmg-72qh .

- use fedora:latest in contrib/skopeoimage/*/Dockerfile
- Fix test bug that prevented useful diagnostics on registry fail
- proxy: Add an API to fetch the config upconverted to OCI
- proxy: Add support for manifest lists
- proxy: Uncapitalize all errors
- Cirrus: Bump Fedora to release 35 & Ubuntu to 21.10
- Update to c/image v5.17.0

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-11-26 11:49:38 -05:00
Miloslav Trmač
69728fdf93 Update to c/image v5.17.0
Includes a fix for CVE-2021-41190 / GHSA-77vh-xpmg-72qh .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-11-22 14:19:37 -05:00
Daniel J Walsh
904c745bb0
Merge pull request #1499 from cevich/update_to_f35
Cirrus: Bump Fedora to release 35 & Ubuntu to 21.10
2021-11-19 11:57:13 -05:00
Chris Evich
47066f2d77
Cirrus: Bump Fedora to release 35 & Ubuntu to 21.10
The Fedora 35 cloud images have switched to UEFI boot with a GPT
partition. Formerly, all Fedora images included support for runtime
re-partitioning. However, the requirement to test alternate storage
has since been dropped/removed.  Rather than maintain a disused
feature, and supporting scripts, these Fedora VM images have reverted
to the default: Automatically resize to 100% on boot.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-19 10:11:16 -05:00
Daniel J Walsh
fab344c335
Merge pull request #1509 from containers/dependabot/go_modules/github.com/docker/docker-20.10.11incompatible
Bump github.com/docker/docker from 20.10.10+incompatible to 20.10.11+incompatible
2021-11-18 09:18:17 -05:00
dependabot[bot]
adfa1d4e49
Bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.10+incompatible to 20.10.11+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.10...v20.10.11)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-18 09:33:27 +00:00
Valentin Rothberg
002978258c
Merge pull request #1495 from cgwalters/proxy-config
proxy: Add `GetConfig`, add manifest list support, add an integration test
2021-11-16 17:00:59 +01:00
Colin Walters
05a2ed4921 proxy: Uncapitalize all errors
By Go convention.

Signed-off-by: Colin Walters <walters@verbum.org>
2021-11-15 21:02:14 -05:00
Colin Walters
e9535f868b tests: Add new "procutils" that exposes PDEATHSIG
To fix compilation on MacOS.

I think actually we want to use this pervasively in our tests
on Linux; it doesn't really matter when run inside a transient
container, but `PDEATHSIG` is useful for persistent containers (e.g.)
toolbox and when running outside of a pid namespace, e.g. on a host
system shell directly or in systemd.

Signed-off-by: Colin Walters <walters@verbum.org>
2021-11-15 21:02:14 -05:00
Colin Walters
fa86297c36 proxy_test: Test GetConfig
Now that we have a test suite, let's use it more.

Signed-off-by: Colin Walters <walters@verbum.org>
2021-11-15 21:02:14 -05:00
Colin Walters
2bb6f27d13 proxy_test: Add helper to read all from a reply
Prep for testing `GetConfig`.

Signed-off-by: Colin Walters <walters@verbum.org>
2021-11-15 21:02:14 -05:00
Colin Walters
f90725d80c proxy_test: Add a helper method to call without fd
To verify in one place.

Signed-off-by: Colin Walters <walters@verbum.org>
2021-11-15 21:02:14 -05:00
Colin Walters
644074cbb4 proxy: Add support for manifest lists
We need to support manifest lists. I'm not sure how I missed this
originally.  At least now we have integration tests that cover this.

The issue here is fairly subtle - the way c/image works right now,
`image.FromUnparsedImage` does pick a matching image from a list
by default.  But it also overrides `GetManifest()` to return the
original manifest list, which defeats our goal here.

Handle this by adding explicit manifest list support code.  We'll
want this anyways for future support for `GetRawManifest` or so
which exposes OCI manifest lists to the client.

Signed-off-by: Colin Walters <walters@verbum.org>
2021-11-15 21:02:14 -05:00
Colin Walters
83416068d3 tests/integration/proxy_test: New test that exercises proxy.go
I debated adding "reverse dependency testing" using
https://crates.io/crates/containers-image-proxy
but I think it's easier to reuse the test infrastructure here.

This also starts fleshing out a Go client for the proxy (not
that this is going to be something most Go projects would want
versus vendoring c/image...but hey, maybe it'll be useful).

Now what I hit in trying to use the main test images is currently
the proxy fails on manifest lists, so I'll need to fix that.

Signed-off-by: Colin Walters <walters@verbum.org>
2021-11-15 21:02:14 -05:00
Colin Walters
a3adf36db6 proxy: Use float → int helper for pipeid
Just noticed while scrolling past the code.

Signed-off-by: Colin Walters <walters@verbum.org>
2021-11-15 21:02:14 -05:00
Colin Walters
6510f1011b proxy: Add a helper to return a byte array
Since this is shared between the manifest and config paths.

Signed-off-by: Colin Walters <walters@verbum.org>
2021-11-15 21:02:14 -05:00
Colin Walters
e7b7be5734 proxy: Add an API to fetch the config upconverted to OCI
While the caller could fetch this today as a blob, it'd be in
either docker or oci schema.  In keeping with the model of having
this proxy only expose OCI, add an API which uses the c/image logic
to do the conversion.

This is necessary for callers to get the diffIDs, and in general
to implement something like an external `skopeo copy`.

Signed-off-by: Colin Walters <walters@verbum.org>
2021-11-15 21:02:14 -05:00
Miloslav Trmač
1e01e38459
Merge pull request #1502 from edsantiago/duh
Fix bug that prevented useful diagnostics on registry fail
2021-11-11 15:12:08 +01:00
Ed Santiago
942cd6ec58 Fix bug that prevented useful diagnostics on registry fail
Sigh. 'expr 1 - 1' yields 0 (correctly) but also exits 1. This
is even documented in the man page, but I didn't know it. And
thus, on the final iteration, when timeout reached 0, BATS
errored out on the expr instead of continuing to the 'podman logs'
or the 'die' message.

Solution is super trivial: use $(( ... )) instead of expr.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-11-10 19:56:33 -07:00
Tom Sweeney
a902709e14
Merge pull request #1496 from lsm5/skopeoimage
use fedora:latest in contrib/skopeoimage/*/Dockerfile
2021-11-08 17:05:21 -05:00
Lokesh Mandvekar
41de7f2f66
use fedora:latest in contrib/skopeoimage/*/Dockerfile
Fixes: #1492

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2021-11-08 14:44:42 -05:00
Lokesh Mandvekar
c264cec359 Move to v1.5.2-dev
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2021-11-04 10:15:42 -04:00
Lokesh Mandvekar
2b357d8276 Bump to v1.5.1
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2021-11-04 10:15:42 -04:00
Colin Walters
4acc9f0d2c main: Error out if an unrecognized subcommand is provided
Surprisingly, the spf13/cobra CLI parsing logic, when presented
with an unknown subcommand outputs usage to stdout
and *exits successfully*.

This is bad for both users and scripts.  Cargo cult some code
I found in podman to handle this.

Motivated by https://github.com/containers/containers-image-proxy-rs/pull/1

Signed-off-by: Colin Walters <walters@verbum.org>
2021-11-03 15:14:49 -04:00
Daniel J Walsh
c2732cb15d
Merge pull request #1480 from jaikiran/785
skopeo inspect command - introduce a way to skip querying all available tags
2021-10-26 14:57:51 -04:00
Valentin Rothberg
49f709576a
Merge pull request #1487 from vrothberg/vendor-common
move optional-flag code to c/common/pkg/flag
2021-10-26 16:15:36 +02:00
Valentin Rothberg
7885162a35 move optional-flag code to c/common/pkg/flag
As the title says: it allows for code share with other tools such as
Podman and Buildah.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-10-26 15:18:30 +02:00
Miloslav Trmač
01e58f8e25
Merge pull request #1484 from lyft/precompute-digests
Add --dest-precompute-digests option for docker
2021-10-22 16:54:56 +02:00
Paul Fisher
36d860ebce Add --dest-precompute-digests option for docker
This ensures layers are not uploaded that already exist on the
destination registry, in exchange for streaming layers to temporary
files when digests are unknown (ex. compressing "on the fly").

Signed-off-by: Paul Fisher <pfisher@lyft.com>
2021-10-21 17:29:03 -07:00
Paul Fisher
c8777f3bf7 bump containers/image to 2541165
Signed-off-by: Paul Fisher <pfisher@lyft.com>
2021-10-21 17:29:03 -07:00
Miloslav Trmač
8f64c0412f
Merge pull request #1483 from jpetazzo/static-build-instructions
Add instructions to generate static binaries
2021-10-20 16:07:29 +02:00
Jerome Petazzoni
985d4c09ae Add instructions to generate static binaries
Following the discussion in #1478, we don't want to provide
(and maintain) static binaries, but giving instructions to
produce such builds (with appropriate warnings around these
instructions) was considered acceptable, so - here we go!
2021-10-19 23:10:48 +02:00
Miloslav Trmač
8182255d22
Merge pull request #1476 from cgwalters/proxy
Add new `experimental-image-proxy` hidden command
2021-10-14 20:48:58 +02:00