[delete image] Update readme for delete feature
This commit is contained in:
parent
bc215978ac
commit
6180c206b4
88
README.md
88
README.md
|
@ -1,6 +1,7 @@
|
|||
# Docker Registry UI
|
||||
|
||||
## Overview
|
||||
|
||||
This project aims to provide a user interface for your private docker registry v2.
|
||||
There is no default registry on this UI, you should add your own with the UI.
|
||||
You can manage more than one registry server.
|
||||
|
@ -12,13 +13,14 @@ This web user interface use [Riot](https://github.com/Riot/riot) the react-like
|
|||
|
||||
## Features
|
||||
|
||||
* List all your repositories/images.
|
||||
* List all tags for a repository/image
|
||||
* Sort the tag list
|
||||
* One interface for many registry
|
||||
* Use a secured docker registry
|
||||
- List all your repositories/images.
|
||||
- List all tags for a repository/image
|
||||
- Sort the tag list
|
||||
- One interface for many registry
|
||||
- Use a secured docker registry
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Basic
|
||||
|
||||
First you need node and npm in order to download dependencies.
|
||||
|
@ -30,34 +32,43 @@ npm install
|
|||
```
|
||||
|
||||
Now you can open index.html with your browser or use a http-server
|
||||
|
||||
```sh
|
||||
npm install -g http-server
|
||||
http-server
|
||||
```
|
||||
|
||||
### Docker
|
||||
|
||||
The docker contains the source code and a node webserver in order to serve the docker-registry-ui.
|
||||
|
||||
#### Get the docker image
|
||||
|
||||
You can get the image in three ways
|
||||
|
||||
From sources with this command :
|
||||
|
||||
```sh
|
||||
git clone https://github.com/Joxit/docker-registry-ui.git
|
||||
docker build -t joxit/docker-registry-ui docker-registry-ui
|
||||
```
|
||||
|
||||
Or build with the url :
|
||||
```sh
|
||||
|
||||
```sh
|
||||
docker build -t joxit/docker-registry-ui github.com/Joxit/docker-registry-ui
|
||||
```
|
||||
|
||||
Or pull the image from [docker hub](https://hub.docker.com/r/joxit/docker-registry-ui/) :
|
||||
|
||||
```sh
|
||||
docker pull joxit/docker-registry-ui
|
||||
```
|
||||
|
||||
#### Run the docker
|
||||
|
||||
To run the docker and see the website on your 8080 port, try this :
|
||||
|
||||
```sh
|
||||
docker run -d -p 8080:8080 joxit/docker-registry-ui
|
||||
```
|
||||
|
@ -67,13 +78,66 @@ docker run -d -p 8080:8080 joxit/docker-registry-ui
|
|||
Your server should be configured to accept CORS.
|
||||
|
||||
If your docker registry does not need credentials, you will need to send this HEADER :
|
||||
```
|
||||
Access-Control-Allow-Origin: '*'
|
||||
```
|
||||
|
||||
Access-Control-Allow-Origin: '*'
|
||||
|
||||
If your docker registry need credentials, you will need to send these HEADERS :
|
||||
|
||||
```yml
|
||||
http:
|
||||
headers:
|
||||
Access-Control-Allow-Origin: '<your docker-registry-ui url>'
|
||||
Access-Control-Allow-Credentials: true
|
||||
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS'] # Optional
|
||||
```
|
||||
Access-Control-Allow-Origin: '<your docker-registry-ui url>'
|
||||
Access-Control-Allow-Credentials: true
|
||||
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS'] # Optional
|
||||
|
||||
## Using delete
|
||||
|
||||
For deleting images, you need to activate the delete feature in your registry :
|
||||
|
||||
```yml
|
||||
storage:
|
||||
delete:
|
||||
enabled: true
|
||||
```
|
||||
|
||||
And you need to add these HEADERS :
|
||||
|
||||
```yml
|
||||
http:
|
||||
headers:
|
||||
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
|
||||
Access-Control-Expose-Headers: ['Docker-Content-Digest']
|
||||
```
|
||||
|
||||
## Registry example
|
||||
|
||||
Example of docker registry configuration file:
|
||||
|
||||
```yml
|
||||
version: 0.1
|
||||
log:
|
||||
fields:
|
||||
service: registry
|
||||
storage:
|
||||
delete:
|
||||
enabled: true
|
||||
cache:
|
||||
blobdescriptor: inmemory
|
||||
filesystem:
|
||||
rootdirectory: /var/lib/registry
|
||||
http:
|
||||
addr: :5000
|
||||
headers:
|
||||
X-Content-Type-Options: [nosniff]
|
||||
Access-Control-Allow-Origin: ['http://127.0.0.1:8001']
|
||||
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
|
||||
Access-Control-Allow-Headers: ['Authorization']
|
||||
Access-Control-Max-Age: [1728000]
|
||||
Access-Control-Allow-Credentials: [true]
|
||||
Access-Control-Expose-Headers: ['Docker-Content-Digest']
|
||||
auth:
|
||||
htpasswd:
|
||||
realm: basic-realm
|
||||
path: /etc/docker/registry/htpasswd
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue