hangar

command module
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

Hangar

Build Status Docker Pulls Go Report Card

Hangar is a tool for mirroring/copying multi-arch container images from the public registry to your registry with manifest list support, it also can generate an image list file according to Rancher KDM data and chart repositories for mirroring/saving images.

It provides the following subcommands:

  • mirror: Mirror the container image to the private registry.
  • save: Download the container image to the local file and generate a compressed package.
  • load: Load the file created by save command onto the private registry.
  • convert-list: Convert image list from rancher-images.txt to format used by mirror command.
  • mirror-validate: Validate the mirrored images.
  • load-validate: Validate the loaded images.
  • sync: Sync extra images into image cache folder.
  • compress: Compress the image cache folder.
  • decompress: Decompress tarball created by save command.
  • generate-list: Generate an image-list by KDM data and Chart repositories.

Docs

For more detailed usage information about this project, please refer to the documents in docs folder.

English | 简体中文-使用文档

QuickStart

It's recommended to run hangar from the docker image without installing skopeo dependency manually, see docker-images.md.

$ docker pull cnrancher/hangar:${VERSION}

$ docker run cnrancher/hangar:${VERSION} --help
Usage:	hangar COMMAND [OPTIONS]
......

$ docker run --entrypoint bash -v $(pwd):/images -it cnrancher/hangar:${VERSION}

Or you can download the latest compiled binary file hangar-${OS}-${ARCH}-${VERSION} from the Release page.

# Download hangar binary file from GitHub Release
wget https://github.com/cnrancher/hangar/releases/download/<VERSION>/hangar-<OS>-<ARCH>-<VERSION> -O hangar
chmod +x ./hangar

# Get help message
./hangar -h

Build

See build.md document.

LICENSE

Copyright 2022-2023 Rancher Labs, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
archive/part
part package implements a ReadWriteCloser to write data into multi parts and read data from different parts
part package implements a ReadWriteCloser to write data into multi parts and read data from different parts

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL