Skip to content

Registry

Chetabahana edited this page Jul 3, 2019 · 13 revisions

Table of Contents

Local

Certificate

Cleaning

Command

Reguler

$ gcloud container images list-tags gcr.io/chetabahana/backend
7d6ce698cce2  latest  2019-04-12T14:13:16
7c077a9ca45a          2019-04-12T14:00:38

$ gcloud container images delete --quiet gcr.io/chetabahana/backend@DIGEST
ERROR: (gcloud.container.images.delete) [gcr.io/chetabahana/backend@DIGEST] \
DIGEST must be of the form "sha256:<digest>

$ DIGEST=`gcloud container images list-tags gcr.io/chetabahana/backend \
--filter='-tags:*' --format='get(digest)'`

$ echo $DIGEST
sha256:7c077a9ca45aea7134d8436a3071aceb5fa62758cc86eadec63f02692b7875f7

$ [ -z "$DIGEST" ] && echo "No digest" || gcloud container images delete \
--quiet gcr.io/chetabahana/backend@$DIGEST
Digests:
- gcr.io/chetabahana/backend@sha256:7c077a9ca45aea7134d8436a3071aceb5fa62758cc86.....
Deleted [gcr.io/chetabahana/backend@sha256:7c077a9ca45aea7134d8436a3071aceb5fa62.....


$ gcloud container images list-tags gcr.io/chetabahana/backend
DIGEST        TAGS    TIMESTAMP
7d6ce698cce2  latest  2019-04-12T14:13:16

Recursive

$ gcloud container images list-tags gcr.io/${PROJECT_ID/${IMAGE} \
--filter='-tags:*' --format='get(digest)' --limit=unlimited | 
awk '{print "gcr.io/${PROJECT_ID}/${IMAGE}@" $1}' | 
xargs gcloud container images delete --quiet
Digests:
- gcr.io/chetabahana/backend@sha256:7c077a9ca45aea7134d8436a3071aceb5fa62758cc86.....
Deleted [gcr.io/chetabahana/backend@sha256:7c077a9ca45aea7134d8436a3071aceb5fa62.....

Scripts

Particular

Dockertools

Referensi

Project Tutorial

You are on the wiki of our repo

Chetabahana Project

Clone this wiki locally