luxas / manifest-tool

Manifest tool for manifest list object creation/query

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

manifest - A tool to query/create manifest list objects in the Docker Registry v2.3 and above

manifest is a command line utility to create manifests list objects in the Docker registry. Manifest lists are defined in the v2.2 image specification and allow for multi-architecture and/or multi-OS images to be stored in the Docker registry.

Sample Usage

Note: For pushing to an authenticated registry like DockerHub, you will need a config generated via docker login:

docker login
<enter your credentials>

The Docker config file generated from the login is required for authentication with the repository from the manifest tool:

./manifest --docker-cfg '/home/myuser/.docker/' /home/myuser/sample.yml

In the current version, a YAML file defines the images which will be combined into a manifest list object. A sample YAML file is shown below. Cross-repository push is implemented in manifest so the image names can differ as long as they are in the same registry. For example, a source image can be myprivreg:5000/someimage_ppc64le:latest to create a manifest list with image name myprivreg:5000/someimage:latest.

Using a private registry running on port 5000, a sample YAML might look like:

image: myprivreg:5000/someimage:latest
manifests:
  -
    image: myprivreg:5000/someimage:ppc64le
    platform:
      architecture: ppc64le
      os: linux
  -
    image: myprivreg:5000/someimage:amd64
    platform:
      architecture: amd64
      features:
        - sse
      os: linux

If your cli config is found but it doesn't contain the necessary credentials for the queried registry you'll receive an error. You can fix this by either logging in (via docker login) or providing --username and --password.

Building

To build manifest you need either Go 1.6, or Go 1.5 with the variable GO15VENDOREXPERIMENT exported. Either set up your $GOPATH properly, or clone this repository into your $GOPATH to allow compilation to successfully build the tool.

$ cd $GOPATH/src
$ mkdir -p github.com/estesp
$ cd github.com/estesp
$ git clone https://github.com/estesp/manifest-tool
$ cd manifest-tool && make binary

Installing

If you built from source:

$ sudo make install

Tests

You need Docker installed on your system in order to run the test suite.

$ make test-integration

TODO

  1. Automatically populate OS and architecture from source manifests?

License

Apache License 2.0

About

Manifest tool for manifest list object creation/query

License:Apache License 2.0


Languages

Language:Go 88.6%Language:Shell 9.9%Language:Makefile 1.5%