docker注册表推送错误

时间:2015-10-29 10:17:22

标签: docker docker-registry

我尝试在本地启动AWS S3配置的docker注册表。

环境

  • OS:ubuntu trusty64
  • Docker:1.7.1~1.8.3
  • Docker注册表版本:0.9.1~2.1.1

Docker信息

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

我使用下面的命令启动了docker注册表。

$ 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"`

那么你可以检查一下我的配置是否错误了吗?

2 个答案:

答案 0 :(得分: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.yml方法s3 s3 {/ 1}}。

可以找到here's an example的完整配置列表。查看存储部分,了解textbox相关选项。

答案 1 :(得分:0)

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

相关问题