Registry - moby/moby

The Moby project is an open-source project that provides a reference assembly called Moby Origin, which is the base for the Docker container platform. The project is designed for system builders who want to build their own container-based systems, and participants can choose components from the Moby library or bring their own components.

A key component of the Moby project is the Moby registry, which is used for managing and distributing containers. The registry is an implementation of the storagedriver.StorageDriver interface which uses the local filesystem to store all registry files. The root directory for storing registry files can be specified using the rootdirectory parameter, which defaults to /var/lib/registry. The maximum number of simultaneous blocking filesystem operations can be specified using the maxthreads parameter.

To deploy a registry server, you can use the following command:

$ docker run -d -p 5000:5000 --restart=always --name registry registry:2

This will start the registry container, mapping port 5000 on the host to port 5000 on the container. The registry will be accessible at http://<host>:5000.

To authenticate with a registry, you can use the docker login command, which will prompt you for your username and password. The credentials can also be passed using the -u and -p flags. For example:

$ docker login -u myusername -p mypassword myregistry.com

Alternatively, you can use the IMGPKG_REGISTRY_USERNAME_0 and IMGPKG_REGISTRY_PASSWORD_0 environment variables to authenticate with a registry.

To push an image to a registry, you can use the docker push command. For example:

$ docker push myregistry.com/myimage:mytag

You can also use the oras command-line tool to push and pull images to and from a registry. For example:

$ oras push myregistry.com/myimage:mytag

Sources: