Browse Source

Move readme to docs page and put in README template

master
Girish Ramakrishnan 5 months ago
parent
commit
28e6fe9db6
  1. 64
      README.md

64
README.md

@ -1,60 +1,36 @@
# Docker Registry App
# Docker Registry Cloudron App
Adding a user is a simple affair:
This repository contains the Cloudron app package source for Docker Registry
```bash
htpasswd -bB /app/data/htpasswd username password
```
Demo user is: admin/admin
## Installation
## Integration with GitLab
[![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=com.docker.registry)
1. Create a volume named "registry-shared"
2. Attach volume name "registry-shared" to both GitLab and Docker Registry applications
3. Create folders "containers" and "certs" on the host filesystem inside the path that is assigned to
the "registry-shared" volume
4. Run the following commands inside the certs folder:
or using the [Cloudron command line tooling](https://cloudron.io/references/cli.html)
```bash
openssl req -nodes -newkey rsa:2048 -keyout registry-auth.key -out registry-auth.csr -subj "/CN=gitlab-issuer"
openssl x509 -in registry-auth.csr -out registry-auth.crt -req -signkey registry-auth.key -days 365000
```
cloudron install --appstore-id com.docker.registry
```
5. Modify the config.yml (inside /app/data) of the Docker Registry app by altering the auth part to resemble the
following:
## Building
```yaml
auth:
token:
realm: <GITLAB_HOST>/jwt/auth
service: container_registry
issuer: gitlab-issuer
rootcertbundle: /media/registry-shared/certs/registry-auth.crt
The app package can be built using the [Cloudron command line tooling](https://cloudron.io/references/cli.html).
```
cd docker-registry-app
cloudron build
cloudron install
```
## Testing
Change the 'rootdirectory' value inside the same config file to:
The e2e tests are located in the `test/` folder and require [nodejs](http://nodejs.org/). They are creating a fresh build, install the app on your Cloudron, perform tests, backup, restore and test if the repos are still ok. The tests expect port 29418 to be available.
```bash
/media/registry-shared/containers
```
cd docker-registry-app/test
6. Modify the gitlab.yml (inside /app/data) of the GitLab app by adding the following lines (some of them
might already be there, so skip them):
```yaml
production:
<<: *base
registry:
enabled: true
host: <DOCKER_REGISTRY_HOST>
port: 443
api_url: https://<DOCKER_REGISTRY_HOST>
key: /media/registry-shared/certs/registry-auth.key
path: /media/registry-shared/containers
issuer: gitlab-issuer
npm install
USERNAME=<cloudron username> PASSWORD=<cloudron password> mocha --bail test.js
```
7. Restart both apps
Loading…
Cancel
Save