Commit Graph

1620 Commits

Author SHA1 Message Date
dependabot-preview[bot]
21613f194f
Bump gopkg.in/yaml.v2 from 2.2.2 to 2.2.7
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.2 to 2.2.7.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.2...v2.2.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-06 09:48:50 -05:00
dependabot-preview[bot]
afaa9e7f00
Bump github.com/containers/storage from 1.15.1 to 1.15.2
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.15.1 to 1.15.2.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.15.1...v1.15.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-06 09:46:40 -05:00
Flavio Castelli
9c402f3799 Introduce the sync command
The skopeo sync command can sync images between a SOURCE and a
destination.

The purpose of this command is to assist with the mirroring of
container images from different docker registries to a single
docker registry.

Right now the following source/destination locations are implemented:

  * docker -> docker
  * docker-> dir
  * dir -> docker

The dir location is supported to handle the use case
of air-gapped environments.
In this context users can perform an initial sync on a trusted machine
connected to the internet; that would be a `docker` -> `dir` sync.
The target directory can be copied to a removable drive that can then be
plugged into a node of the air-gapped environment. From there a
`dir` -> `docker` sync will import all the images into the registry serving
the air-gapped environment.

Notes when specifying the `--scoped` option:

The image namespace is changed during the  `docker` to `docker` or `dir` copy.
The FQDN of the registry hosting the image will be added as new root namespace
of the image. For example, the image `registry.example.com/busybox:latest`
will be copied to
`registry.local.lan/registry.example.com/busybox:latest`.

The image namespace is not changed when doing a
`dir:` -> `docker` sync operation.

The alteration of the image namespace is used to nicely scope images
coming from different registries (the Docker Hub, quay.io, gcr,
other registries). That allows all of them to be hosted on the same
registry without incurring in clashes and making their origin explicit.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
Co-authored-by: Marco Vedovati <mvedovati@suse.com>
2019-12-02 13:42:39 +01:00
Marco Vedovati
8ccd7b994d openshift cluster: remove .docker directory on teardown
Remove the $HOME/.docker directory when tearing down a cluster,
so that subsequent cluster creations can be carried out successfully.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-12-02 13:42:39 +01:00
Daniel J Walsh
3ed6e83c4a
Merge pull request #776 from containers/dependabot/go_modules/github.com/containers/storage-1.15.1
Bump github.com/containers/storage from 1.14.0 to 1.15.1
2019-11-30 07:47:04 -05:00
dependabot-preview[bot]
04bc64f593
Bump github.com/containers/storage from 1.14.0 to 1.15.1
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.14.0 to 1.15.1.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.14.0...v1.15.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-29 14:55:29 -05:00
Daniel Strobusch
73248bd639 document installation via apk on alpine
Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
2019-11-28 10:15:37 +01:00
Valentin Rothberg
2bfa89532d
Merge pull request #772 from harche/doc_fix
Fix typos in doc for image encryption
2019-11-27 12:14:38 +01:00
Harshal Patil
c6bc236769 Fix typos in doc for image encryption
Signed-off-by: Harshal Patil <harshal.patil@in.ibm.com>
2019-11-27 15:12:48 +05:30
Daniel J Walsh
ce6ec7720e
Merge pull request #732 from harche/pr_branch
Image encryption/decryption support in skopeo
2019-11-26 06:46:59 -05:00
Harshal Patil
39ff039b3b Image encryption/decryption support in skopeo
Signed-off-by: Harshal Patil <harshal.patil@in.ibm.com>
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2019-11-26 15:17:38 +05:30
Valentin Rothberg
912b7e1e09
Merge pull request #770 from vrothberg/vendor-in-container
make vendor-in-container
2019-11-26 10:28:05 +01:00
Valentin Rothberg
88fd117257 make vendor-in-container
Add a vendor-in-container make target to allow for executing make vendor
in a golang:1.13 container.  The CI is currently enforcing golang 1.13
which has a different vendoring behavior than previous versions which
can lead to failing tests as some files might be added or deleted.  The
new make target will help users who are not using 1.13 to vendor their
changes.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-26 10:09:54 +01:00
Daniel J Walsh
34ab4c4f32
Merge pull request #763 from containers/dependabot/go_modules/github.com/containers/buildah-1.11.5
Bump github.com/containers/buildah from 1.11.4 to 1.11.5
2019-11-25 10:35:33 -05:00
dependabot-preview[bot]
5f3219a854 Bump github.com/containers/buildah from 1.11.4 to 1.11.5
Bumps [github.com/containers/buildah](https://github.com/containers/buildah) from 1.11.4 to 1.11.5.
- [Release notes](https://github.com/containers/buildah/releases)
- [Changelog](https://github.com/containers/buildah/blob/master/CHANGELOG.md)
- [Commits](https://github.com/containers/buildah/compare/v1.11.4...v1.11.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-25 15:42:59 +01:00
Valentin Rothberg
23d9383a36 Travis: use go v1.13
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-25 15:42:37 +01:00
Daniel J Walsh
39540db170
Merge pull request #760 from mtrmac/test-failures
Support running tests from c/image
2019-11-21 18:20:46 -08:00
Miloslav Trmač
af0734832b Use a Windows Nano Server image instead of Server Core for multi-arch testing
This image is about 100 MB instead of about 2 GB for the Server Core,
decreasing disk requirements and hopefully significantly speeeding up
integration tests.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-11-21 21:25:35 +01:00
Miloslav Trmač
81caa0fa5d Increase test timeout to 15 minutes
Apparently we run into the 10-minute timeout now in Travis.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-11-21 21:25:35 +01:00
Miloslav Trmač
dd66c1d342 Run the test-system container without --net=host
Experimentally, this seems to help with localhost access inside that
container (but I have no idea what's the reason for that).

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-11-21 21:25:35 +01:00
Miloslav Trmač
6991ba8563 Mount /run/systemd/journal/socket into test-system containers
The nested podman tries to write to it.  This primarily only
removes noise from logs, it does not seem to significantly change
behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-11-21 21:25:35 +01:00
Miloslav Trmač
db877dca36 Don't unnecessarily filter out vendor from (go list ./...) output
(go list) removes the vendor subdirectory automatically since
Go 1.9.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-11-21 21:25:33 +01:00
Miloslav Trmač
8eba94f271 Use -mod=vendor in (go {list,test,vet})
This allows using the vendored dependencies instead of
searching for them in $GOPATH and elsewhere.

This does not necessarily matter for skopeo itself, but
the test-skopeo Makefile target in containers/image uses
(go mod edit -replace) to replace the vendored c/image with
a locally-edited copy; skopeo's (make check) then runs tests in
a container which does not have access to this locally-edited
copy, and since Go 1.13 this causes (go {list,test,vet})
to fail if -mod=vendor is not used.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-11-21 21:25:10 +01:00
Valentin Rothberg
24f4f82c09
Merge pull request #756 from containers/dependabot/go_modules/github.com/containers/buildah-1.11.4
Bump github.com/containers/buildah from 1.8.4 to 1.11.4
2019-11-02 08:28:13 +01:00
dependabot-preview[bot]
05ae513b18 Bump github.com/containers/buildah from 1.8.4 to 1.11.4
Bumps [github.com/containers/buildah](https://github.com/containers/buildah) from 1.8.4 to 1.11.4.
- [Release notes](https://github.com/containers/buildah/releases)
- [Changelog](https://github.com/containers/buildah/blob/master/CHANGELOG.md)
- [Commits](https://github.com/containers/buildah/compare/v1.8.4...v1.11.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-02 07:41:01 +01:00
Daniel J Walsh
332bb459e6
Merge pull request #757 from containers/dependabot/go_modules/github.com/urfave/cli-1.22.1
Bump github.com/urfave/cli from 1.20.0 to 1.22.1
2019-11-01 13:36:04 -04:00
Daniel J Walsh
307d9c2252
Merge pull request #751 from giuseppe/drop-ostree
skopeo: drop support for ostree
2019-11-01 11:03:16 -04:00
Valentin Rothberg
1094c7d61d
Merge pull request #738 from mtrmac/inspect-aws-403
Don't critically fail on a 403 when listing tags
2019-11-01 15:05:25 +01:00
dependabot-preview[bot]
876595e634 Bump github.com/urfave/cli from 1.20.0 to 1.22.1
Bumps [github.com/urfave/cli](https://github.com/urfave/cli) from 1.20.0 to 1.22.1.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/v1.22.1/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v1.20.0...v1.22.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-01 13:17:12 +01:00
Giuseppe Scrivano
140b47e8e9
skopeo: drop support for ostree
drop support for the ostree backend.  The only known user for the
backend is the atomic CLI tool that is not maintained anymore
upstream.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1766404

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-01 12:42:06 +01:00
Miloslav Trmač
cd8c0085b1 Don't critically fail on a 403 when listing tags
Per a report in https://github.com/containers/skopeo/issues/726 ,
it can happen if the user is not allowed the ListImages action
on AWS ECR.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-10-31 21:11:46 +01:00
Miloslav Trmač
75b7d1e2af
Merge pull request #753 from rhatdan/storage
Remove references to storage.conf
2019-10-31 21:11:20 +01:00
Daniel J Walsh
10d0ebb9fe
Merge pull request #754 from mtrmac/podman-login-consistency
Revert "Temporarily work around auth.json location confusion"
2019-10-31 14:40:10 -04:00
Daniel J Walsh
a18ec3f693
Merge pull request #639 from rhatdan/atomic
Remove references to atomic
2019-10-31 14:39:25 -04:00
Daniel J Walsh
02432cf063
Merge pull request #746 from chuanchang/issue729
systemtest: inpsect container image different from current platform arch
2019-10-31 13:39:47 -04:00
Miloslav Trmač
d83d081942 Revert "Temporarily work around auth.json location confusion"
This reverts commit 4962559e5c.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-10-31 17:33:39 +01:00
Daniel J Walsh
ce2db02200
Remove references to atomic
Move signature yaml file to point at /var/lib/containers/sigstore.

Change skopeo-copy.1 to use containers-storage and docker transports
rather then atomic.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-10-31 08:26:15 -04:00
Daniel J Walsh
df92a33ca9
Remove references to storage.conf
These are getting out of date and should be left in containers/storage.
If packagers need it then then should get it from that repo.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-10-31 08:21:44 -04:00
Miloslav Trmač
153520e20e
Merge pull request #752 from giuseppe/fix-pkg-name
Dockerfile: use golang-github-cpuguy83-go-md2man
2019-10-30 13:23:31 +01:00
Giuseppe Scrivano
b21a59705f
Dockerfile: use golang-github-cpuguy83-go-md2man
the package was renamed on Fedora 31.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-30 08:12:51 +01:00
Daniel J Walsh
a263b353a1
Merge pull request #750 from vrothberg/release
Release v0.1.40
2019-10-28 13:59:27 -04:00
Valentin Rothberg
a18a5eaecd bump version to v0.1.41-dev
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-10-28 17:16:31 +01:00
Valentin Rothberg
be6146b0a8 release skopeo v0.1.40
* vendor containers/image v5.0.0
* copy: add a --all/-a flag
* System tests: various fixes
* Temporarily work around auth.json location confusion
* systemtest: copy: docker->storage->oci-archive
* systemtest/010-inspect.bats: require only PATH
* systemtest: add simple env test in inspect.bats
* bash completion: add comments to keep scattered options in sync
* bash completion: use read -r instead of disabling SC2207
* bash completion: support --opt arg completion
* bash-completion: use replacement instead of sed
* bash completion: disable shellcheck SC2207
* bash completion: double-quote to avoid re-splitting
* bash completions: use bash replacement instead of sed
* bash completion: remove unused variable
* bash-completions: split decl and assignment to avoid masking retvals
* bash completion: double-quote fixes
* bash completion: hard-set PROG=skopeo
* bash completion: remove unused variable
* bash completion: use `||` instead of `-o`
* bash completion: rm eval on assigned variable
* copy: add --dest-compress-format and --dest-compress-level
* flag: add optionalIntValue
* Makefile: use go proxy
* inspect --raw: skip the NewImage() step
* update OCI image-spec to 775207bd45b6cb8153ce218cc59351799217451f
* inspect.go: inspect env variables
* ostree: use both image and & storage buildtags

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-10-28 17:16:18 +01:00
Miloslav Trmač
8057da700c
Merge pull request #749 from vrothberg/update-image
vendor containers/image v5.0.0
2019-10-28 14:40:46 +01:00
Valentin Rothberg
8f24d28130 vendor containers/image v5.0.0
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-10-28 10:37:46 +01:00
Alex Jia
2553a230d0 systemtest: inspect container image different from current platform arch
When --raw is provided, can inspect show the raw manifest list, w/o
requiring any particular platform to be present, this test case is
used for make sure inspect command w/ --raw option works well for
container image is different from current platform arch.

Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
2019-10-24 14:33:45 +08:00
Valentin Rothberg
4b6a5da86a
Merge pull request #741 from nalind/manifest-lists
copy: add a --all/-a flag
2019-10-22 17:54:22 +02:00
Nalin Dahyabhai
7d251f5a74 copy: add a --all/-a flag
Add a --all/-a flag to instruct us to attempt to copy all of the
instances in the source image, if the source image specified to "skopeo
copy" is actually a list of images.  Previously, we'd just try to locate
one for our preferred OS/arch combination.

Add a couple of tests to verify that we can copy an image into and then
back out of containers-storage.  The contents of an image that has been
copied out of containers-storage need a bit of tweaking to compensate
for containers-storage's habit of returning uncompressed versions of the
layer blobs that were originally written to it, in order to be
comparable to the image as it was when it was pulled from a registry.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-10-22 11:05:42 -04:00
Valentin Rothberg
5f9a6ea621
Merge pull request #744 from edsantiago/bats
System tests: various fixes
2019-10-16 10:07:17 +02:00
Ed Santiago
58248412bd System tests: various fixes
- zstd test - give unique name.

   a36d81c copy/pasted an existing test but didn't give
   the new test a new name, leading to bats warning:
      duplicate test name(s) in [...]/020-copy.bats

 - start_registry() - use bash builtins, not curl, to test
   if registry port is open.

   curl on Fedora now barfs with "Received HTTP/0.9 when not
   allowed" when the registry is run with SSL, because the
   response is not valid HTTP. One workaround would be 'curl
   --http0.9' but (surprise) that option doesn't exist on rhel8;
   and even with that option we would need --output /dev/null
   to silence a different curl warning. Curl is overkill
   for this purpose anyway, all we really need is netcat
   or some simple binary is-port-listening-or-not test.
   Fortunately, bash provides a /dev/tcp/<host>/<port>
   emulator that does the right thing and works on Fedora
   as well as RHEL8.

 - new log_and_run() helper

   This is the noisiest yet least critical part of this PR.
   I'm sorry. It's motivated by my frustration in trying
   to reproduce the curl problem above: getting just the
   right incantation of openssl + podman-run cost me time.
   With this enhancement, important commands are logged
   as part of the output of failing tests, making it
   easy[*] for maintenance programmers to figure out a
   recipe for reproducing the failure.

     [*] "easy" as long as the test-writing developer
         uses log_and_run() wisely.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-10-15 15:59:14 -06:00