docker-registry
How to pass arguments to a Dockerfile?
As of Docker 1.9, You are looking for –build-arg and the ARG instruction. Check out this document for reference. This will allow you to add ARG arg to the Dockerfile and then build with docker build –build-arg arg=2.3 .
How to get remote access to a private docker-registry?
OK – I found the solution to this – after a day of digging. For docker below 1.12.1: It turns out that the new client version refuses to work with a private registry without SSL. To fix this – the daemon on the client machine should be launched with the insecure flag: Just type: sudo … Read more
How do I download Docker images without using the pull command?
Just an alternative – This is what I did in my organization for couchbase image where I was blocked by a proxy. On my personal laptop (OS X) ~$ $ docker save couchbase > couchbase.tar ~$ ls -lh couchbase.tar -rw——- 1 vikas devops 556M 12 Dec 21:15 couchbase.tar ~$ xz -9 couchbase.tar ~$ ls -lh … Read more
Add Insecure Registry to Docker
(Copying answer from question) To add an insecure docker registry, add the file /etc/docker/daemon.json with the following content: { “insecure-registries” : [ “hostname.cloudapp.net:5000” ] } and then restart docker.
How to move Docker containers between different hosts?
Alternatively, if you do not wish to push to a repository: Export the container to a tarball docker export <CONTAINER ID> > /home/export.tar Move your tarball to new machine Import it back cat /home/export.tar | docker import – some-name:latest
How to pass ARG value to ENTRYPOINT?
Like Blake Mitchell sais, you cannot use ARG in ENTRYPOINT. However you can use your ARG as a value for ENV, that way you can use it with ENTRYPOINT: Dockerfile ARG my_arg ENV my_env_var=$my_arg ENTRYPOINT echo $my_env_var and run: docker build –build-arg “my_arg=foo” …
How to delete images from a private docker registry?
Currently you cannot use the Registry API for that task. It only allows you to delete a repository or a specific tag. In general, deleting a repository means, that all the tags associated to this repo are deleted. Deleting a tag means, that the association between an image and a tag is deleted. None of … Read more
Where can I find the sha256 code of a docker image?
Latest answer Edit suggested by OhJeez in the comments. docker inspect –format=”{{index .RepoDigests 0}}” $IMAGE Original answer I believe you can also get this using docker inspect –format=”{{.RepoDigests}}” $IMAGE Works only in Docker 1.9 and if the image was originally pulled by the digest. Details are on the docker issue tracker.
How to get a list of images on docker registry v2
For the latest (as of 2015-07-31) version of Registry V2, you can get this image from DockerHub: docker pull distribution/registry:master List all repositories (effectively images): curl -X GET https://myregistry:5000/v2/_catalog > {“repositories”:[“redis”,”ubuntu”]} List all tags for a repository: curl -X GET https://myregistry:5000/v2/ubuntu/tags/list > {“name”:”ubuntu”,”tags”:[“14.04”]} If the registry needs authentication you have to specify username and password … Read more