Use concourse to pull image from docker hub and push to a private registry

#1

Hi,

I’m able to pull an image from docker hub using concourse.

I’m also able to manually push this image to a private docker registry. In concourse, I’m able to pull the image from this private registry.

I would like to push the image from docker hub into the private registry using concourse.

How do I accomplish this?

Any pointers would be appreciated.

#2

Hello @ashankar, welcome to Concourse!

Are you sure you really need to do this? A private Docker registry is able to function in mirror mode, see https://docs.docker.com/registry/recipes/mirror/ for details.

Among the many howtos, see for example https://hackernoon.com/mirror-cache-dockerhub-locally-for-speed-f4eebd21a5ca.

#3

Hi Marco,

Thanks for the welcome note and reply to my question.

I am not sure if it is necessary or not.

Could there by security restrictions on pulling from a public registry?

AS

#4

Hi Marco,

Could you tell me how to push an image pulled from Docker Hub into a private registry?

I was trying various tasks/steps but couldn’t quite get it.

Regards,
AS

#5

You would need to configure a resource for the image in the private registry using the docker image resource or the new docker registry resource then put to it after getting from dockerhub.