user2363318
user2363318

Reputation: 1067

docker(1.5.1) artifactory (3.x) registry management

8b44529354f3: Download complete

8b9b56bb19d4: Download complete

79b1e69a4835: Download complete

Upvotes: 0

Views: 56

Answers (1)

BMW
BMW

Reputation: 45243

Seems as interview questions. Interesting.

Can't answer all of them, but try to answer some of them. Will update later if have better solution.

The docker registry has gotten huge pretty quickly, is there a way to clean up the registry?

Need be done by scripting currently.

https://github.com/docker/docker-registry/pull/409

https://github.com/docker/docker-registry/issues/706

https://github.com/docker/docker-registry/issues/523

Is there a way to combine all the dependent layers, I'd like to cut down on how long it takes to download an image

update later.

Is there a way to pull a specific dependent layer:

No, I can't find the way. If someone knows how to do, let me know.

Can you revert a docker push?

Some one answered it in https://groups.google.com/forum/#!topic/docker-user/wNHzbFv7cDw

That’s one of the real strengths of Docker: the ability to go back to a previous commit. The secret is simply to docker tag the image you want.

Here’s an example. In this example, I first installed ping, then committed, then installed curl, and committed that. Then I rolled back the image to contain only ping:

$ docker history imagename
IMAGE               CREATED             CREATED BY                SIZE
f770fc671f11        12 seconds ago      apt-get install -y curl   21.3 MB
28445c70c2b3        39 seconds ago      apt-get install ping      11.57 MB
8dbd9e392a96        7 months ago                                  131.5 MB

$ docker tag 2844 imagename   # <-- that's the secret right there

$ docker history imagename
IMAGE               CREATED             CREATED BY             SIZE
28445c70c2b3        56 seconds ago      apt-get install ping   11.57 MB
8dbd9e392a96        7 months ago                               131.5 MB

Upvotes: 1

Related Questions