Skip to content

Artifact to help setup a private Docker registry on a Chameleon KVM node

Notifications You must be signed in to change notification settings

ChameleonCloud/kvm_private_registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Chameleon Docker Registry

This repository helps you set up your own private docker registry on a KVM instance.

Setup

Pre-requisite: Setup and configure a KVM instance. Setup security groups to permit 22 (ssh), 80 (http), and 443 (https).

  1. Install docker and docker-compose. Install package apache2-utils.

  2. Disable firewall (since we are using security groups)

sudo systemctl stop firewalld
sudo systemctl disable firewalld
  1. Clone this git repo
git clone https://github.com/ChameleonCloud/kvm_private_registry.git
  1. Create users.csv, with information on how users should authenticate. Each line should be username,password.

  2. Run the command ./run.sh. You will be asked for your email, which Let's Encrypt requires to request an SSL certificate. Then this command will create the file htpasswd, which is used by the registry to authentiate users.

In the output, you'll see a line like:

Starting registry on kvm-dyn-W-X-Y-Z.tacc.chameleoncloud.org

where W-X-Y-Z refers to the floating IP address of the KVM instance. Take note of this hostname.

  1. On your local machine, run docker login kvm-dyn-W-X-Y-Z.tacc.chameleoncloud.org, using the hostname from step 5. You'll be asked for a username and password, which must come from users.csv. Once successful, you can use this docker registry as normal.

  2. If you require further functionality, such as multi-tenant namespaces, see this repo for how to configure an additional docker_auth service.

Troubleshooting

  • Self-signed certificate error: Check the output of the command docker compose logs traefik for more details. These logs may describe a problem that occured while requesting a certificate.

  • 404 Not Found: This may be an issue with the registry service failing to start. Check the output of docker compose logs registry.

  • Other error: Check that the registry service is working by running this curl command. If it shows an UNAUTHORIZED message, then the services are working as expected (since curl is not supplying credentials).

curl -L https://kvm-dyn-W-X-Y-Z.tacc.chameleoncloud.org/v2/_catalog/

Try docker logout kvm-dyn-W-X-Y-Z.tacc.chameleoncloud.org and then re-login.

About

Artifact to help setup a private Docker registry on a Chameleon KVM node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages