docker-image-resource icon indicating copy to clipboard operation
docker-image-resource copied to clipboard

docker.pkg.github.com support?

Open yelizariev opened this issue 6 years ago • 5 comments

It seems, that the image is uploaded, but then an error happens on trying to pull the image. Context is below.

My pipeline config is something like this:

resources:
# ...
- name: docker-registry
  type: docker-image
  source:
    repository: docker.pkg.github.com/it-projects-llc/hound/pr
    username: ((github-username))
    password: ((github-token))

jobs:
# ....
  - put: docker-registry
    params:
      build: pr
      dockerfile: pr/DockerfilePR
      tag_file: pr-info/tag.txt


screenshot-ci 8080 yelizariev dev it-projects info-2019 11 23-19_14_29

When I try to pull locally, the command does not work:


$ docker pull docker.pkg.github.com/it-projects-llc/hound/pr@sha256:4c836c350d9f38061f96428228bd26f672afca7c6e3f48d486101bc45783af49
Error response from daemon: manifest for docker.pkg.github.com/it-projects-llc/hound/pr@sha256:4c836c350d9f38061f96428228bd26f672afca7c6e3f48d486101bc45783af49 not found

But it does works with the tag. And you can see that the downloaded tag has the same sha:

$ docker pull docker.pkg.github.com/it-projects-llc/hound/pr:pr-8-head-e520d7f-base-33f8705 
pr-8-head-e520d7f-base-33f8705: Pulling from it-projects-llc/hound/pr
89d9c30c1d48: Already exists 
7196c122958a: Already exists 
c374e3dd66a7: Already exists 
585ea8360d37: Already exists 
10e1bd8c3dd3: Already exists 
6e0205926582: Already exists 
56d962d43dca: Pull complete 
0aa135f6d7bb: Pull complete 
Digest: sha256:4c836c350d9f38061f96428228bd26f672afca7c6e3f48d486101bc45783af49
Status: Downloaded newer image for docker.pkg.github.com/it-projects-llc/hound/pr:pr-8-head-e520d7f-base-33f8705

yelizariev avatar Nov 23 '19 14:11 yelizariev

Is there a workaround for this?

yelizariev avatar Nov 23 '19 14:11 yelizariev

Ok, the workaround is simple:

 - get_params:
     skip_download: true

yelizariev avatar Nov 23 '19 14:11 yelizariev

Seems like it is the expected behaviour of docker.pkg.github.com that you can only pull an image by tag but not sha. And Thx for the workaround!

xtremerui avatar May 15 '20 04:05 xtremerui

This apparently also breaks resources-types from being read from GitHub. Is there a any update on this issue?

qvistgaard avatar Aug 03 '20 11:08 qvistgaard

@qvistgaard refer to the link in my previous comment. Could you use tag when config the resource-types?

xtremerui avatar Aug 04 '20 15:08 xtremerui