我正在尝试运行私有docker注册表。我克隆了git存储库并运行它。
然后我从docker中提取了基本图像,并按照Sam Alba's guide上的指示对其进行了标记。
sudo docker pull base
sudo docker tag b750fe79269d localhost:5000/base
我将图像推送到本地存储库以下是我从docker和docker注册表中获得的内容。
sudo docker push localhost:5000/base
The push refers to a repository [localhost:5000/base] (len: 1)
Processing checksums
Sending image list
Pushing repository localhost:5000/base (1 tags)
Pushing 27cf784147099545
Buffering to disk 78093344/? (n/a)
Pushing 78.09 MB/78.09 MB (100%)
我按
时来自docker-registry的日志"127.0.0.1 - - [12/Sep/2013:12:30:29] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http"
2013-09-12 12:30:29,033 INFO: "127.0.0.1 - - [12/Sep/2013:12:30:29] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http"
2013-09-12 12:30:29,042 DEBUG: check_session: Session is empty
"127.0.0.1 - - [12/Sep/2013:12:30:29] "PUT http://localhost:5000/v1/repositories/base/ HTTP/1.1" 200 2 "-" "docker/0.5.3 go/go1.1 kernel/3.9.0-0-generic"
2013-09-12 12:30:29,045 INFO: "127.0.0.1 - - [12/Sep/2013:12:30:29] "PUT http://localhost:5000/v1/repositories/base/ HTTP/1.1" 200 2 "-" "docker/0.5.3 go/go1.1 kernel/3.9.0-0-generic"
2013-09-12 12:30:29,048 DEBUG: check_session: Session is empty
2013-09-12 12:30:29,049 DEBUG: api_error: Image not found
"127.0.0.1 - - [12/Sep/2013:12:30:29] "GET /v1/images/27cf784147099545/json HTTP/1.1" 404 34 "-" "Go 1.1 package http"
2013-09-12 12:30:29,051 INFO: "127.0.0.1 - - [12/Sep/2013:12:30:29] "GET /v1/images/27cf784147099545/json HTTP/1.1" 404 34 "-" "Go 1.1 package http"
2013-09-12 12:30:29,056 DEBUG: check_session: Session is empty
"127.0.0.1 - - [12/Sep/2013:12:30:29] "PUT /v1/images/27cf784147099545/json HTTP/1.1" 200 4 "-" "docker/0.5.3 go/go1.1 kernel/3.9.0-0-generic"
2013-09-12 12:30:29,059 INFO: "127.0.0.1 - - [12/Sep/2013:12:30:29] "PUT /v1/images/27cf784147099545/json HTTP/1.1" 200 4 "-" "docker/0.5.3 go/go1.1 kernel/3.9.0-0-generic"
2013-09-12 12:32:00,811 DEBUG: check_session: Session is empty
2013-09-12 12:32:01,764 DEBUG: put_image_layer: Error when computing tarsum invalid header
2013-09-12 12:32:01,764 DEBUG: put_image_layer: Wrong checksum
2013-09-12 12:32:01,764 DEBUG: api_error: Checksum mismatch, ignoring the layer
"127.0.0.1 - - [12/Sep/2013:12:32:01] "PUT /v1/images/27cf784147099545/layer HTTP/1.1" 400 56 "-" "docker/0.5.3 go/go1.1 kernel/3.9.0-0-generic"
2013-09-12 12:32:01,778 INFO: "127.0.0.1 - - [12/Sep/2013:12:32:01] "PUT /v1/images/27cf784147099545/layer HTTP/1.1" 400 56 "-" "docker/0.5.3 go/go1.1 kernel/3.9.0-0-generic"
答案 0 :(得分:0)
首先要测试最后一个版本的Docker(0.6.1)。随意在https://github.com/dotcloud/docker
上打开一个问题答案 1 :(得分:0)
尝试运行docker tag base&推送到私人注册表,因为docker push无法理解除图像或存储库名称之外的任何内容。
$ sudo docker pull base
$ sudo docker tag base localhost:5000 / base
$ sudo docker push localhost:5000 / base