Download Docker-registry Image with Git Prohibited

Latest response

As I had git prohibited, can I download a registry image by http/ftp download just as downloading Rhel atomic image? Thank you.

Responses

Would be useful to us If someone can please comment on above question.

Thanks,
Dhawal.

Git isn't involved in downloading docker images. You simply use the 'docker' command line client ('docker pull repository/namespace/image').

I believe Lars is correct.
As an experiement, we can "disable" git by providing an alternate executable that fails:

$ cat > /tmp/git <<EOF
#!/bin/sh
echo 2>&1 "ERROR: DISABLED (see /tmp/git)"
exit 1
EOF
$ chmod +x /tmp/git
$ PATH=/tmp:$PATH

These three commands create a file /tmp/git, make it executable, and arrange for it to be invoked instead of the "normal" git. With this in place, we see:

$ git status
ERROR: DISABLED (see /tmp/git)
$ echo $?
1

With git thus disabled, we can try a normal docker pull command:

$ sudo docker pull projectatomic/atomicapp
[...]
Digest: sha256:c9615ec93837acfeb4dd9c1daa7744c3c87599ce5faddf44ec18ac9a230abc81
Status: Downloaded newer image for docker.io/projectatomic/atomicapp:latest
$ echo $?
0

Once we are done with the experiment, we can delete /tmp/git and close the shell where the PATH environment variable was modified.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.