2015-10-29 60 views
3

我试图在本地启动码头注册表与AWS S3配置。码头注册表推送错误

环境

  • 操作系统:Ubuntu的trusty64
  • 泊坞窗:1.7.1〜1.8.3
  • 码头工人注册表版本:0.9.1〜2.1.1

泊坞窗信息

Containers: 10 
Images: 30 
Storage Driver: aufs 
Root Dir: /var/lib/docker/aufs 
Backing Filesystem: extfs 
Dirs: 50 
Dirperm1 Supported: false 
Execution Driver: native-0.2 
Logging Driver: json-file 
Kernel Version: 3.13.0-66-generic 
Operating System: Ubuntu 14.04.3 LTS 
CPUs: 1 
Total Memory: 1.955 GiB 
Name: vagrant-ubuntu-trusty-64 

我启动了码头注册表wi下面的命令。

$ docker run \ 
    -e SETTINGS_FLAVOR=s3 \ 
    -e AWS_BUCKET=<my AWS_BUCKET> 
    -e STORAGE_PATH=/registry \ 
    -e AWS_KEY=<my AWS_KEY> \ 
    -e AWS_SECRET=<my AWS_SECRET> \ 
    -e SEARCH_BACKEND=sqlalchemy \ 
    -p 5000:5000 \ 
    registry 

而我推我自己的ubuntu镜像。

$ docker push 127.0.0.1:5000/ubuntu 

然后我得到了下面的结果。

3fd0c2ae8ed2: Pushing [==================================================>] 

196.8 MB/196.8 MB 

Received HTTP code 500 while uploading layer: "<!DOCTYPE HTML PUBLIC \"- 
`//W3C//DTD HTML 3.2 Final//EN\">\n<title>500 Internal Server 
Error</title>\n<h1>Internal Server Error</h1>\n<p>The server encountered an 
internal error and was unable to complete your request. Either the server 
is overloaded or there is an error in the application.</p>\n"` 

所以你可以检查我的配置是否错误?

回答

1

我建议您使用docker register v2来代替。

像这样:

docker run \ 
    -e SETTINGS_FLAVOR=s3 \ 
    -e AWS_BUCKET=<my AWS_BUCKET> 
    -e STORAGE_PATH=/registry \ 
    -e AWS_KEY=<my AWS_KEY> \ 
    -e AWS_SECRET=<my AWS_SECRET> \ 
    -e SEARCH_BACKEND=sqlalchemy \ 
    -p 5000:5000 \ 
    registry:2 

同时,尽量使用config.yml方法中,config.ymlhere's an examples3

完整的配置列表可以在here找到。检查存储部分的s3相关选项。

0

我假设您使用的是docker s3存储驱动程序。 首先要检查您是否有权上传到该存储分区。 安装aws-cli并尝试使用这些凭据上传测试文件,看看是否可行