docker-registry

How to pass arguments to a Dockerfile?

流过昼夜 提交于 2020-01-11 15:04:40
问题 I am using RUN instruction within a Dockerfile to install a rpm RUN yum -y install samplerpm-2.3 However, I want to pass the value "2.3" as an argument. My RUN instruction should look something like: RUN yum -y install samplerpm-$arg where $arg=2.3 回答1: You are looking for --build-arg and the ARG instruction. These are new as of Docker 1.9. Check out https://docs.docker.com/engine/reference/builder/#arg. This will allow you to add ARG arg to the Dockerfile and then build with docker build -

Docker Swarm : docker stack deploy results on untagged images <none>

不羁岁月 提交于 2020-01-06 08:45:12
问题 I'm deploying some images from my registry into my application server using docker swarm mode hos t : My image in the registry is looking like this (executing docker images ) : REPOSITORY TAG IMAGE ID CREATED SIZE localhost:5000/myApp G02R00C09_myTag c1fc2242f9a0 2 hours ago 272MB Under my docker compose file , my service looks like this : --- version: '3.4' services: ihm: image: myRegistryServer:5000/myApp:G02R00C09_myTag stdin_open: true volumes: - /opt/logs:/opt/logs tty: true ports: -

microk8s pulling image, stuck in ContainerCreating state

∥☆過路亽.° 提交于 2020-01-04 02:59:08
问题 As described in the doc (based on). I am on Ubuntu as a host OS. docker --version Docker version 18.09.6, build 481bc77 microk8s 1.14/beta Enable local registry for microk2s : microk8s.enable registry Checking: watch microk8s.kubectl get all --all-namespaces container-registry pod/registry-577986746b-v8xqc 1/1 Running 0 36m Then: Edit: sudo vim /etc/docker/daemon.json Add this content: { "insecure-registries" : ["127.0.0.1:32000"] } Restart: sudo systemctl restart docker Double checking, see

remove docker repository on remote docker registry

泄露秘密 提交于 2020-01-03 17:47:11
问题 Given a docker registry managing multiple docker repositories, how do I delete one of the repositores? In my case, curl -X GET localhost:5000/v2/_catalog {"repositories":["repo1", "repo2", "repo3"]} I want to remove repository repo1 so that _catalog looks like curl -X GET localhost:5000/v2/_catalog {"repositories":["repo2", "repo3"]} We can see repo1 appears to have only the default "latest" image tag. curl -X GET localhost:5000/v2/repo1/tags/list {"name":"repo1","tags":["latest"]} (Maybe

How to use a private registry with docker swarm and traefik in docker

天大地大妈咪最大 提交于 2020-01-03 04:59:06
问题 I am running a single node swarm, I am using traefik to manage all my external connections, and I want to run a registry such that I can connect to it at registry.myhost.com Now all the examples I can see suggest creating a registry as a normal container rather than a service, however when I do this, I do not have the ability to add it to my traefik network and thus enable it to be found externally. Do I need to create another internal network and connect both traefik and it to it, and if so,

Using Docker API to push to private registry

喜你入骨 提交于 2020-01-03 03:03:26
问题 What is the syntax to push an image to a private registry? From the documentation, I would expect the below to work: curl -X POST -i "http://localhost:2375/images/localhost:5000/oillio/my_app:1.0-SNAPSHOT/push" I can use the CLI to do this: docker push localhost:5000/oillio/my_app:1.0-SNAPSHOT This works fine. But I can't figure out what the syntax is to do this from the API. When I try the above, I get a status 500 response with the text "EOF" 回答1: The tag needs to be as a parameter and not

Using Docker API to push to private registry

爱⌒轻易说出口 提交于 2020-01-03 03:03:13
问题 What is the syntax to push an image to a private registry? From the documentation, I would expect the below to work: curl -X POST -i "http://localhost:2375/images/localhost:5000/oillio/my_app:1.0-SNAPSHOT/push" I can use the CLI to do this: docker push localhost:5000/oillio/my_app:1.0-SNAPSHOT This works fine. But I can't figure out what the syntax is to do this from the API. When I try the above, I get a status 500 response with the text "EOF" 回答1: The tag needs to be as a parameter and not

Mesos cannot deploy container from private Docker registry

亡梦爱人 提交于 2020-01-02 16:19:14
问题 I have a private Docker registry that is accessible at https://docker.somedomain.com (over standard port 443 not 5000). My infrastructure includes a set up of Mesosphere, which have docker containerizer enabled. I'm am trying to deploy a specific container to a Mesos slave via Marathon; however, this always fails with Mesos failing the task almost immediately with no data in stderr and stdout of that sandbox. I tried deploying from an image from the standard Docker Registry and it appears to

Is that possible to get image ID from Docker Registry V2?

和自甴很熟 提交于 2020-01-01 16:56:30
问题 When an image has been pushed to registry V2, does the image ID will be pushed to registry as well? Is that possible to get image ID for a certain repository from V2 registry? 回答1: If the image was pushed with Docker Client 1.10 or above, you can obtain the image ID from the registry with GET /v2/<image>/manifests/<tag> Your request must include the header Accept: application/vnd.docker.distribution.manifest.v2+json In the response, the image ID will be in the Content-Docker-Digest Response

What is the docker registry v2 API endpoint to get the digest for an image?

蹲街弑〆低调 提交于 2020-01-01 02:39:08
问题 According to https://docs.docker.com/registry/spec/api/ I can call /v2/<name>/tags/list to get a list of the tags for a given image. It works fine, e.g.: {"name"=>"avi/test", "tags"=>["latest"]} However, I would like the digest for each tag. Yes, the "digest" is actually the hash of the manifest (at least as I best understood it from the API; not 100% clear). However, I would like a way of knowing what a unique identifier for "latest" (and every other tag) is. Use case: I might have someone