dockerregistry推送错误

我尝试在本地启动Dockerregistry与AWS S3configuration。

环境

  • 操作系统:Ubuntu的trusty64
  • Docker:1.7.1〜1.8.3
  • Dockerregistry版本: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 

我使用下面的命令启动了dockerregistry。

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

那么你可以检查我的configuration是否错误?

我build议你使用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方法, 这里是一个使用s3config.yml 示例 。

完整的configuration列表可以在这里find。 检查存储部分的s3相关选项。

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