Git Product home page Git Product logo

skopeo's Introduction

Skopeo


skopeo is a command line utility that performs various operations on container images and image repositories.

skopeo does not require the user to be running as root to do most of its operations.

skopeo does not require a daemon to be running to perform its operations.

skopeo can work with OCI images as well as the original Docker v2 images.

Skopeo works with API V2 container image registries such as docker.io and quay.io registries, private registries, local directories and local OCI-layout directories. Skopeo can perform operations which consist of:

  • Copying an image from and to various storage mechanisms. For example you can copy images from one registry to another, without requiring privilege.
  • Inspecting a remote image showing its properties including its layers, without requiring you to pull the image to the host.
  • Deleting an image from an image repository.
  • Syncing an external image repository to an internal registry for air-gapped deployments.
  • When required by the repository, skopeo can pass the appropriate credentials and certificates for authentication.

Skopeo operates on the following image and repository types:

  • containers-storage:docker-reference An image located in a local containers/storage image store. Both the location and image store are specified in /etc/containers/storage.conf. (This is the backend for Podman, CRI-O, Buildah and friends)

  • dir:path An existing local directory path storing the manifest, layer tarballs and signatures as individual files. This is a non-standardized format, primarily useful for debugging or noninvasive container inspection.

  • docker://docker-reference An image in a registry implementing the "Docker Registry HTTP API V2". By default, uses the authorization state in $XDG_RUNTIME_DIR/containers/auth.json, which is set using skopeo login.

  • docker-archive:path[:docker-reference] An image is stored in a docker save-formatted file. docker-reference is only used when creating such a file, and it must not contain a digest.

  • docker-daemon:docker-reference An image docker-reference stored in the docker daemon internal storage. docker-reference must contain either a tag or a digest. Alternatively, when reading images, the format can also be docker-daemon:algo:digest (an image ID).

  • oci:path:tag An image tag in a directory compliant with "Open Container Image Layout Specification" at path.

For a detailed description how to install or build skopeo, see install.md.

Skopeo is also available as a Container Image on quay.io. For more information, see the Skopeo Image page.

Inspecting a repository

skopeo is able to inspect a repository on a container registry and fetch images layers. The inspect command fetches the repository's manifest and it is able to show you a docker inspect-like json output about a whole repository or a tag. This tool, in contrast to docker inspect, helps you gather useful information about a repository or a tag before pulling it (using disk space). The inspect command can show you which tags are available for the given repository, the labels the image has, the creation date and operating system of the image and more.

Examples:

Show properties of fedora:latest

$ skopeo inspect docker://registry.fedoraproject.org/fedora:latest
{
    "Name": "registry.fedoraproject.org/fedora",
    "Digest": "sha256:0f65bee641e821f8118acafb44c2f8fe30c2fc6b9a2b3729c0660376391aa117",
    "RepoTags": [
        "34-aarch64",
        "34",
        "latest",
        ...
    ],
    "Created": "2022-11-24T13:54:18Z",
    "DockerVersion": "1.10.1",
    "Labels": {
        "license": "MIT",
        "name": "fedora",
        "vendor": "Fedora Project",
        "version": "37"
    },
    "Architecture": "amd64",
    "Os": "linux",
    "Layers": [
        "sha256:2a0fc6bf62e155737f0ace6142ee686f3c471c1aab4241dc3128904db46288f0"
    ],
    "LayersData": [
        {
            "MIMEType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "Digest": "sha256:2a0fc6bf62e155737f0ace6142ee686f3c471c1aab4241dc3128904db46288f0",
            "Size": 71355009,
            "Annotations": null
        }
    ],
    "Env": [
        "DISTTAG=f37container",
        "FGC=f37",
        "container=oci"
    ]
}

Show container configuration from fedora:latest

$ skopeo inspect --config docker://registry.fedoraproject.org/fedora:latest  | jq
{
  "created": "2020-04-29T06:48:16Z",
  "architecture": "amd64",
  "os": "linux",
  "config": {
    "Env": [
      "DISTTAG=f32container",
      "FGC=f32",
      "container=oci"
    ],
    "Cmd": [
      "/bin/bash"
    ],
    "Labels": {
      "license": "MIT",
      "name": "fedora",
      "vendor": "Fedora Project",
      "version": "32"
    }
  },
  "rootfs": {
    "type": "layers",
    "diff_ids": [
      "sha256:a4c0fa2b217d3fd63d51e55a6fd59432e543d499c0df2b1acd48fbe424f2ddd1"
    ]
  },
  "history": [
    {
      "created": "2020-04-29T06:48:16Z",
      "comment": "Created by Image Factory"
    }
  ]
}

Show unverified image's digest

$ skopeo inspect docker://registry.fedoraproject.org/fedora:latest | jq '.Digest'
"sha256:655721ff613ee766a4126cb5e0d5ae81598e1b0c3bcf7017c36c4d72cb092fe9"

Copying images

skopeo can copy container images between various storage mechanisms, including:

  • Container registries

    • The Quay, Docker Hub, OpenShift, GCR, Artifactory ...
  • Container Storage backends

  • Local directories

  • Local OCI-layout directories

$ skopeo copy docker://quay.io/buildah/stable docker://registry.internal.company.com/buildah
$ skopeo copy oci:busybox_ocilayout:latest dir:existingemptydirectory

Deleting images

$ skopeo delete docker://localhost:5000/imagename:latest

Syncing registries

$ skopeo sync --src docker --dest dir registry.example.com/busybox /media/usb

Authenticating to a registry

Private registries with authentication

skopeo uses credentials from the --creds (for skopeo inspect|delete) or --src-creds|--dest-creds (for skopeo copy) flags, if set; otherwise it uses configuration set by skopeo login, podman login, buildah login, or docker login.

$ skopeo login --username USER myregistrydomain.com:5000
Password:
$ skopeo inspect docker://myregistrydomain.com:5000/busybox
{"Tag":"latest","Digest":"sha256:473bb2189d7b913ed7187a33d11e743fdc2f88931122a44d91a301b64419f092","RepoTags":["latest"],"Comment":"","Created":"2016-01-15T18:06:41.282540103Z","ContainerConfig":{"Hostname":"aded96b43f48","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":["/bin/sh","-c","#(nop) CMD [\"sh\"]"],"Image":"9e77fef7a1c9f989988c06620dabc4020c607885b959a2cbd7c2283c91da3e33","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"DockerVersion":"1.8.3","Author":"","Config":{"Hostname":"aded96b43f48","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":["sh"],"Image":"9e77fef7a1c9f989988c06620dabc4020c607885b959a2cbd7c2283c91da3e33","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"Architecture":"amd64","Os":"linux"}
$ skopeo logout myregistrydomain.com:5000

Using --creds directly

$ skopeo inspect --creds=testuser:testpassword docker://myregistrydomain.com:5000/busybox
{"Tag":"latest","Digest":"sha256:473bb2189d7b913ed7187a33d11e743fdc2f88931122a44d91a301b64419f092","RepoTags":["latest"],"Comment":"","Created":"2016-01-15T18:06:41.282540103Z","ContainerConfig":{"Hostname":"aded96b43f48","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":["/bin/sh","-c","#(nop) CMD [\"sh\"]"],"Image":"9e77fef7a1c9f989988c06620dabc4020c607885b959a2cbd7c2283c91da3e33","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"DockerVersion":"1.8.3","Author":"","Config":{"Hostname":"aded96b43f48","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":["sh"],"Image":"9e77fef7a1c9f989988c06620dabc4020c607885b959a2cbd7c2283c91da3e33","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"Architecture":"amd64","Os":"linux"}
$ skopeo copy --src-creds=testuser:testpassword docker://myregistrydomain.com:5000/private oci:local_oci_image

Contributing

Please read the contribution guide if you want to collaborate in the project.

Commands

Command Description
skopeo-copy(1) Copy an image (manifest, filesystem layers, signatures) from one location to another.
skopeo-delete(1) Mark the image-name for later deletion by the registry's garbage collector.
skopeo-generate-sigstore-key(1) Generate a sigstore public/private key pair.
skopeo-inspect(1) Return low-level information about image-name in a registry.
skopeo-list-tags(1) Return a list of tags for the transport-specific image repository.
skopeo-login(1) Login to a container registry.
skopeo-logout(1) Logout of a container registry.
skopeo-manifest-digest(1) Compute a manifest digest for a manifest-file and write it to standard output.
skopeo-standalone-sign(1) Debugging tool - Sign an image locally without uploading.
skopeo-standalone-verify(1) Debugging tool - Verify an image signature from local files.
skopeo-sync(1) Synchronize images between registry repositories and local directories.

License

skopeo is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

skopeo's People

Contributors

cevich avatar cgwalters avatar chuanchang avatar cyphar avatar dependabot-preview[bot] avatar dependabot[bot] avatar edsantiago avatar eramoto avatar errm avatar giuseppe avatar hswong3i avatar jaikiran avatar jamstah avatar jwhonce avatar lsm5 avatar luap99 avatar mikebrow avatar moio avatar mtrmac avatar nalind avatar qiwang19 avatar renovate[bot] avatar rhatdan avatar runcom avatar saschagrunert avatar tomsweeneyredhat avatar umohnani8 avatar vdemeester avatar vrothberg avatar zhill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skopeo's Issues

Update mtrmac/gpgme vendor again, eventually

#39 fixed build with current RHEL 7, but the updated code is rejected with Go 1.6 (see proglottis/gpgme#5 ).

A hopefully final and fully correct fix was sent upstream as proglottis/gpgme#7 . After we are sure this is the best fix, we should update mtrmac/gpgme (if necessary) and then update the vendored copy in skopeo.

(No action needed right now; filing this now so that it happens eventually.)

Fix TLS verification

e.g. cmd/skopeo/utils.py uses c.GlobalBool("tls-verify") which defaults to false. Should audit everything, really (not that there is that much to audit, but the above may not be the only place).

create new release

it's been a while since the last release of this was put out. Can we cut a tag and so that a distro (like Fedora) can ship an updated version?

go1.4.2 compatibility

Building skopeo in RHEL7 with go1.4.2 gives:

$ /usr/local/go1.4.2/go/bin/go build -o skopeo ./cmd/skopeo
# github.com/projectatomic/skopeo/signature
src/github.com/projectatomic/skopeo/signature/json.go:68: dec.Token undefined (type *json.Decoder has no field or method Token)
src/github.com/projectatomic/skopeo/signature/json.go:72: undefined: json.Delim
src/github.com/projectatomic/skopeo/signature/json.go:76: dec.Token undefined (type *json.Decoder has no field or method Token)
src/github.com/projectatomic/skopeo/signature/json.go:80: undefined: json.Delim
src/github.com/projectatomic/skopeo/signature/json.go:103: dec.Token undefined (type *json.Decoder has no field or method Token)

The fastest thing we can do to deal with this is to create a file signature/json_go1.4.2.go (or the like) and put there a build tag to be compiled only with go1.4.2 and lower - and another file to build with go > 1.4.2 (which has the undefined methods above in the errors). We can just move there paranoidUnmarshalJSONObject so we have two version of this function for the different go versions
.
@mtrmac sounds good to you? is paranoidUnmarshalJSONObject fine to be reimplemented w/o using Token and Delim which aren't available in go1.4.2?

Decide how to reuse the demo shell script

A recent demo of the signing functionality is fairly easy to reuse / explain. Within skopeo, we will replace it with Go code in #118, so there is no reason to keep it in the git repo right now, but it seems a pity to just throw it away.

The shell script still might be useful as is, perhaps as a part of an introduction/walkthrough documentation in the repository, or as a blog post.

So, I will attach the shell script to this issue. Note that it requires the full --sign-by and --policy functionality and the fixtures from #118 (~per my current integrate-all-the-things branch), and it is designed to run inside the skopeo-dev container built by Makefile.

In the worst case, this issue can be closed (perhaps even immediately) and the attached shell script will be preserved in the issue.
start-openshift.sh.txt

Fix --help output

The outputs of skopeo --help and skopeo $command --help are not helpful enough; we need to review them and add the missing documentation.

change repo description

Repository description isn't accurate anymore since skopeo is about to be able to download image's layers in addition to inspect images on a repository

Run Travis tests also in CentOS

… to detect build breakage before we merge to master.

I got as far as #46 , but finishing it would require more time than I can spare right now.

man 1

it's empty right now

Create DBUS API for Python, etc

As of now, the Atomic CLI must use a subprocess to interact with skopeo. This is not entirely ideal. Among other things, you can see type differences between python2 and 3 when working with the returned information.

DBUS would allow us to "bind" with subprocess, define return types, etc.

spec file out of date?

Currently skopeo is under a freeze in CAHC:

Trying to unfreeze, I get:

iinstall -m 755 skopeo /builddir/build/BUILDROOT/skopeo-0.1.12.10-0d95328125be9e411b8b4b5f301f2dced5a04d31.5d9911952c34defcf625a69b2ca451345e52e459.el7.centos.x86_64/usr/bin
install: cannot stat 'skopeo': No such file or directory

I looked at this briefly but it seems like the actual binary is ending up in some strange place (WORK=/tmp/go-build43465149 ).

Possible to copy from local docker to OCI image?

Hello, I know I can do this:

$ skopeo copy docker://busybox:latest oci:existingemptydirectory

However, can I specify the source as a docker image which is only present locally? Trying it gives me:

$ sudo docker images
REPOSITORY                      TAG                 IMAGE ID            CREATED             SIZE
amitsaha/rootfs-1               latest              bbb478419aa9        7 minutes ago       115.9 MB

$ sudo skopeo copy docker://amitsaha/rootfs-1:latest oci:existingemptydirectory1
FATA[0005] Error reading manifest: error fetching manifest: status code: 401, body: {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Name":"amitsaha/rootfs-1","Action":"pull"}]}]}

If this is not yet available, is there any alternative to directly converting a docker image which is not in any supported registry to an OCI bundle? Thanks for any hints!

warn when encountering old unsupported image format

When trying to download an old style docker v1 image format I get an error:

$ ./skopeo copy docker://dustymabe/fedora20-pdftk:latest oci:fedorapdftk 
FATA[0010] Error writing manifest: Unrecognized manifest media type

talking with @runcom I was able to find out that the image format was old and I needed to point to newer v2 images in order to get it to work. would be great if we could add a helpful message for our users on this point.

avoid policy.json check?

On a fresh machine install I just needed skopeo to pull some oci images needed for testing and I realized the tool is failing with:

$ skopeo copy docker://busybox oci:busybox
FATA[0000] Error loading verification policy: open /etc/containers/policy.json: no such file or directory

@mtrmac do you think we can relax this somehow? I know I can use default-policy.json tbh but.. wdyt?

manifests handling

@mtrmac we need something like https://godoc.org/github.com/docker/distribution/manifest and https://godoc.org/github.com/docker/distribution#RegisterManifestSchema.

https://github.com/docker/distribution/blob/master/manifests.go#L86

This should play well with the manifest interface also. We really need to abstract manifests code in skopeo.

I think their structure is perfect in our case when dealing with different kind of manifests media types (and marshaling/unmarshaling)

WDYT I can work on this after #102 and #103

Add signing metadata during push to API

The OpenShift API ImageSignature object provides storage for useful metadata. Skopeo should write this data if possible.

  • imageIdentity: <image_reference>
  • created:
  • issuedBy:
  • issuedTo: # what's the difference?

To clarify to the end user that this information is not verified, populate the SignatureCondition object with the following fields:

  • type: "Complete"
  • status: "Unknown"
  • lastProbeTime:
  • reason: "Initial signing request"
  • message: <???>

page not found when inspecting RH registry

$ skopeo registry.access.redhat.com/rhel7 | jq '.Config.Labels.Name'
time="2016-03-08T16:31:20+01:00" level=error msg="Error trying v2 registry: Error parsing HTTP response: invalid character '<' looking for beginning of value: \"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 3.2 Final//EN\\\">\\n<title>404 Not Found</title>\\n<h1>Not Found</h1>\\n<p>The requested URL was not found on the server.</p><p>If you entered the URL manually please check your spelling and try again.</p>\\n\"" 
"rhel7/rhel"

command is successful but that debug output is weird and docker.io registry doesn't suffer from this

Support openshift 'oc login'

The capability to use .kubeconfig files is great but we frequently don't have the oc client installed on the system to manage the .kubeconfig file.

This is a request for skopeo to support this so we can reduce the host dependencies.

ImageDestination should receive Writers

@mtrmac just a tracking question

Wouldn't it be better if ImageDestination return Writers? I don't have anything in mind about how to unify all the image destinations to do so but as we return Readers from ImageSource it came to my mind why don't do the same and return Writers there.

I'm saying, why don't we try and further abstract methods in ImageDestination to support this? is it doable? wdyt?

HTTP Proxy support

I've been experimenting with CentOS Atomic Host and Fedora Atomic Host recently, and when looking at system containers and installation using the atomic command, I've hit a snag. These boxes don't get web access except via a proxy, and even though I've set HTTP_PROXY and HTTPS_PROXY environment variables, I'm still not able to pull images. Looking through the python code, I noticed that atomic calls skopeo, and on testing skopeo independently, it seems skopeo is not using the http(s) proxy environment variables.

The command I'm running is:
HTTPS_PROXY=http://wwwcache.keele.ac.uk:8080 HTTP_PROXY=http://wwwcache.keele.ac.uk:8080 skopeo --debug inspect docker://docker.io/fedora

The output I receive is:
DEBU[0254] Ping https://registry-1.docker.io/v2/ err &url.Error{Op:"Get", URL:"https://registry-1.docker.io/v2/", Err:(_net.OpError)(0xc820278b90)}
DEBU[0572] Ping http://registry-1.docker.io/v2/ err &url.Error{Op:"Get", URL:"http://registry-1.docker.io/v2/", Err:(_net.OpError)(0xc820278d70)}
FATA[0572] Get http://registry-1.docker.io/v2/: dial tcp 54.175.214.89:80: getsockopt: connection timed out

Additionally, running tcpdump shows no traffic heading to the web proxy, instead direct connection attempts are made to servers hosted in AWS, which fail.

Should this be working? If not, are there any plans to support operating over a web proxy?

Audit handling of digest (non-tag) references

After parseDockerImageName, we treat digests and tags the same. This seems rather suspicious, when the general syntax is name:tag but name@digest; e.g. the CanonicalDockerReference and IntendedDockerReference implementations are probably incorrect.

Integration test bucket needs:

  1. More test cases a) push & pull images using local docker registry b) see @runcom todo notes
  2. OCI test cases need to be added (OCI enabled local registry) a) using modified registry fork that enables OCI push pull.

I'm doing some work on the above. Comments & questions?

Blob upload in dockerImageDestination does not work

DEBU[0019] Uploading mitr/busybox/blobs/uploads/?digest=sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 
DEBU[0019] POST https://atomic-registry.usersys.redhat.com:5000/v2/mitr/busybox/blobs/uploads/?digest=sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 
DEBU[0019] Error uploading, status 202                  

or after s/POST/PUT/:

DEBU[0019] Uploading mitr/busybox/blobs/uploads/?digest=sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 
DEBU[0019] PUT https://atomic-registry.usersys.redhat.com:5000/v2/mitr/busybox/blobs/uploads/?digest=sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 
DEBU[0019] Error uploading, status 404                  

This is explained by distribution/distribution@2a4deee , the API never existed.

I have no idea how this got through all my testing 😞

RH V2 support

Currently RH registry doesn't support V2 APIs and skopeo does not support V1 APIs either:

$ ./skopeo inspect docker://registry.access.redhat.com/rhel7 
FATA[0001] error pinging repository, response code 404

In order for skopeo to work correctly the following APIs should be supported in the RH registry:

GET /v2/
GET /v2/<name>/tags/list
GET /v2/<name>/manifests/<reference>
GET /v2/<name>/blobs/<digest>

More on each of the above https://docs.docker.com/registry/spec/api/

Docker tarsum

I would like to get the tarsum of docker save'd images so that I can use the same sha256 used in the v2 registry. Is Skopeo the right place to add this functionality? I would like something like `skopeo tarsum /path/to/foo.tar' and that internally uses https://github.com/docker/docker/tree/master/pkg/tarsum

What do you think?

Update README.md

With all the new stuff we merged in master the README.md got a bit outdated now. We would need to updated it in order to reflect the current master code with examples. Also, with the upcoming move to libraries it will be far far better to have something easy shown in the main github page.

@mtrmac :)

Rename "policy" to "trust"

The word "trust" seems to resonate with docker users. See Docker Content Trust. The skopeo policy file describes trust quite well but its use must be translated for the uninitiated.

I'm not suggesting we do a global search and replace, but in cases where users interact with files or output, "trust" is a better term to use IMO. Specifically, these files:

cmd/skopeo/copy.go
cmd/skopeo/main.go
docs/skopeo.1.md
Makefile

cc @rhatdan

atomic type awkward

The atomic type is awkward when using with "copy" workflow. The primary object the user knows about is a docker image, locally or in the registry. What we do with the atomic type is infer the docker image reference. This means we don't have the registry URL or port (see #189).

What seems to make more sense is to drop atomic transport type and use a flag to enable writing to openshift API.

Copy:

skopeo copy --sign-by [email protected] --atomic docker-daemon:registry.example.com/my/image docker://registry.example.com/my/image

Standalone:

skopeo standalone-sign --atomic MANIFEST registry.example.com/my/image KEY-FINGERPRINT

Consider an ecosystem-wide, software-agnostic registry configuration file

Various registry configuration items are stored in tool-specific configuration locations:

  • “this registry can be accessed over HTTP” via docker-daemon’s --insecure-registry (which can be in /etc/sysconfig/docker’s INSECURE_REGISTRY, or OPTIONS, or overridden in docker.service); altogether quite difficult to parse; skopeo does not read any of this, adds its own command-line option.
  • The TLS certificate & key supported in skopeo (but not docker?!) also can be only specified on the command line.
  • The sigstore* options considered in #170 , configured in atomic.conf (which makes it awkward to include the parsing and semantics in containers/image).

Would it make sense to introduce a system-wide configuration file, perhaps /etc/containers/docker-registries.yaml, which allows per-registry and per-repository configuration, to be used by all of the tools if possible?

  • The configuration would be shared across various tools (we could even generate --insecure-registry automatically, no need to patch Docker)
  • Well-defined format instead of plain-text OPTIONS would make it easier to manipulate with tools.
  • Consolidates similar information into one place
  • Vendor/project-neutral (but of course supporting vendor extensions, e.g. via x-reverse.domain.name or whatever)

@runcom , @rhatdan ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.