Add support for skopeo copy
This change fixes the API to support skopeo that except status code 201 on creation. Change-Id: I28e4ca5c19f935d0ecbf916d5f89fbb4ca068c19
This commit is contained in:
parent
a6ebe80fc4
commit
6722875907
@ -54,3 +54,15 @@
|
||||
|
||||
- name: Print list of images
|
||||
command: docker image ls --all --digests --no-trunc
|
||||
|
||||
- name: Create a local containers/image
|
||||
shell: buildah commit --rm $(buildah from scratch) local-test
|
||||
|
||||
- name: Check the local image is there
|
||||
command: skopeo inspect containers-storage:localhost/local-test:latest
|
||||
|
||||
- name: Copy the local image to the registry
|
||||
command: >
|
||||
skopeo copy --dest-creds testuser:testpass --dest-tls-verify=false
|
||||
containers-storage:localhost/local-test:latest
|
||||
docker://127.0.0.1:9000/test
|
||||
|
@ -8,11 +8,18 @@
|
||||
workspace: /tmp/registry-test
|
||||
local: false
|
||||
tasks:
|
||||
- name: Add project atomic PPA
|
||||
apt_repository:
|
||||
repo: ppa:projectatomic/ppa
|
||||
become: true
|
||||
|
||||
- name: Install packages
|
||||
package:
|
||||
name:
|
||||
- docker-compose
|
||||
- openssl
|
||||
- skopeo
|
||||
- buildah
|
||||
state: present
|
||||
become: true
|
||||
- name: Run main tasks
|
||||
|
@ -172,7 +172,7 @@ class RegistryAPI:
|
||||
res.headers['Location'] = '/v2/%s/blobs/%s' % (repository, digest)
|
||||
res.headers['Docker-Content-Digest'] = digest
|
||||
res.headers['Content-Range'] = '%s-%s' % (old_length, new_length)
|
||||
res.status = '204 No Content'
|
||||
res.status = '201 Created'
|
||||
|
||||
@cherrypy.expose
|
||||
@cherrypy.config(**{'tools.auth_basic.checkpassword': require_write})
|
||||
|
Loading…
x
Reference in New Issue
Block a user