mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-29 08:20:42 +01:00
Updated Harbor with SeaweedFS (markdown)
1 parent
4067d5dc05
commit
e98cf0bacf
1 file changed
+4
-45
+4
-45
@@ -1,48 +1,7 @@
|
||||
Harbor https://github.com/goharbor/harbor is to store docker images.
|
||||
|
||||
We noticed the Harbor S3 storage backend is not robust. The following is a known issue:
|
||||
There are two ways to use SeaweedFS as a storage backend for Harbor:
|
||||
1. Use Harbor S3 storage backend with SeaweedFS S3.
|
||||
2. Use Harbor file storage backend with SeaweedFS FUSE mount.
|
||||
|
||||
* Image Push Fails with "500 Internal Server Error" on S3 Storage
|
||||
https://docs.openshift.com/container-platform/3.10/install_config/registry/registry_known_issues.html#known-issue-s3-image-push-fails
|
||||
|
||||
The better way to get around this is to simply use `weed mount`. Nothing special. Here is the Harbor config.yml
|
||||
```
|
||||
version: 0.1
|
||||
log:
|
||||
fields:
|
||||
service: registry
|
||||
storage:
|
||||
cache:
|
||||
blobdescriptor: inmemory
|
||||
filesystem:
|
||||
rootdirectory: /data
|
||||
http:
|
||||
addr: :5000
|
||||
headers:
|
||||
X-Content-Type-Options: [nosniff]
|
||||
health:
|
||||
storagedriver:
|
||||
enabled: true
|
||||
interval: 10s
|
||||
threshold: 3
|
||||
|
||||
```
|
||||
|
||||
Suppose you mount the Seaweed to `<seaweedfs_mount_dir>`
|
||||
```
|
||||
weed mount -dir=<seaweedfs_mount_dir>
|
||||
```
|
||||
|
||||
Start Harbor
|
||||
```
|
||||
docker run -p 5000:5000 --restart=always -v ./config.yml:/etc/docker/registry/config.yml -v <seaweedfs_mount_dir>/data:/data registry:2
|
||||
```
|
||||
|
||||
|
||||
Now you can use the harbor running in your `<ip>:5000`.
|
||||
|
||||
```
|
||||
$ docker pull nginx:1.13.5-alpine
|
||||
$ docker tag nginx:1.13.5-alpine <ip>:5000/nginx:1.13.5-alpine
|
||||
$ docker push <ip>:5000/nginx:1.13.5-alpine
|
||||
```
|
||||
For better performance, use S3 API is recommended. This is because FUSE mount currently needs to save the file to a local folder, before uploading the file to SeaweedFS cluster.
|
||||
Reference in new issue
Block a user