3

Does exist the opportunity to redirect pull (or push), when docker tries to get/send image from dockerHub,without changing docker pull arguments? For example:

docker pull gcr.io/distroless/static@sha256:23aa732bba4c8618c0d97c26a72a32997363d591807b0d4c31b0bbc8a774bddf

redirect from gcr.io/distroless/static to my.repo.com/gcr.io/distroless/static, without changing docker pull arguments.

I want to use redirection for example without changing Dockerfile

kozmo
  • 4,024
  • 3
  • 30
  • 48
  • 2
    does this answer to your question https://stackoverflow.com/questions/33054369/how-to-change-the-default-docker-registry-from-docker-io-to-my-private-registry ? – jossefaz Jun 09 '20 at 15:11
  • @yAzou - `...not currently possible to change the default registry` => looks bad. – kozmo Jun 10 '20 at 07:52
  • @yAzou - but many exists a way resolve it outside the docker? – kozmo Jun 10 '20 at 08:51
  • The registry definition is a part of the docker cli...the only way to define it "outisde" is by creating a environment variable and call it....but i do not see any reason to do that – jossefaz Jun 10 '20 at 10:32
  • @yAzou - Which `variable` I have to override/create? How use this approach? – kozmo Jun 10 '20 at 10:34
  • 1
    if you are using linux you can configure the `/etc/docker/daemon.json` file. Have a look on this article : https://www.exoscale.com/syslog/setup-private-docker-registry/ – jossefaz Jun 10 '20 at 10:43

0 Answers0