简体   繁体   English

docker 注册表推送错误

[英]docker registry push error

I tried to launch docker registry with AWS S3 configuration in local.我尝试在本地使用 AWS S3 配置启动 docker 注册表。

Environment环境

  • OS: ubuntu trusty64操作系统:ubuntu trusty64
  • Docker: 1.7.1 ~ 1.8.3码头工人:1.7.1 ~ 1.8.3
  • Docker registry version: 0.9.1 ~ 2.1.1 Docker 注册表版本:0.9.1 ~ 2.1.1

Docker info码头工人信息

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

I launched the docker registry with commands below.我使用以下命令启动了 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

And I pushed my own ubuntu image.我推送了我自己的 ubuntu 镜像。

$ docker push 127.0.0.1:5000/ubuntu

Then I got the result below.然后我得到了下面的结果。

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

So could you check whether my configuration is wrong or not?那你能不能检查一下我的配置是否错误?

I'd suggest you use the docker register v2 instead. 我建议你改用docker register v2。

Like this: 像这样:

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

Also, try use the config.yml approach, here's an example of config.yml with s3 . 另外,尝试使用config.yml方法, config.ymls3 的示例

Full list of the configuration can be found here . 可以在此处找到完整的配置列表。 Check the storage section for s3 related options. 检查存储部分是否有s3相关选项。

I'm assuming that you are using docker s3 storage driver. 我假设您正在使用docker s3存储驱动程序。 First thing to check if you have permissions to upload to that bucket. 首先要检查您是否有权上传到该存储桶。 Install aws-cli and try using those credentials to upload test file see if that works 安装aws-cli并尝试使用这些凭据上传测试文件,看看是否有效

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM