kyunghwanjung
kyunghwanjung

Reputation: 510

docker registry push error

I tried to launch docker registry with AWS S3 configuration in local.

Environment

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 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.

$ 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?

Upvotes: 3

Views: 632

Answers (1)

Andy
Andy

Reputation: 5414

I'd suggest you use the docker register v2 instead.

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.

Full list of the configuration can be found here. Check the storage section for s3 related options.

Upvotes: 1

Related Questions