th registry

สร้าง Registry ติด tag คัดลอก และลบ image ให้ docker และ CI เข้าสู่ระบบด้วย Access token และคุมพื้นที่ด้วย Cleanup policy

เกี่ยวกับ

ทุก Project มี Registry หลัก (default) ที่ Build ของ Container และ Function เก็บ image ไว้: <host>/<project>/<image> สร้าง Registry เพิ่มได้สำหรับ staging และ production หรือสำหรับ image ที่แจกให้คนอื่น image ของ Registry เหล่านั้นคือ <host>/<project>/<registry>/<image> th เรียก repository ตาม path ใน Project: api ใน Registry หลัก prod/api ใน Registry ชื่อ prod ตามด้วย :TAG หรือ @DIGEST (ใส่เลขฐานสิบหก 7 ตัวแรกของ digest ก็พอ)

  • Access token ให้ docker, CI หรือเซิร์ฟเวอร์ที่อื่นเข้าสู่ Registry เดียว แบบอ่านอย่างเดียว (pull) หรืออ่านเขียน (push และ pull) และตั้งวันหมดอายุได้ ในเครื่องของคุณเองใช้ th auth configure-docker ซึ่งให้ docker เข้าได้ทุก Registry ของ Project ที่คุณมีสิทธิ์
  • Public: ทุกคน pull ได้โดยไม่ต้องเข้าสู่ระบบ Project เป็นผู้จ่ายค่าส่งข้อมูลเหมือนการดาวน์โหลดทั่วไป
  • Immutable tags: tag ที่ push แล้วจะไม่ย้ายไป image อื่น (ยกเว้น latest) v1.2.3 จึงหมายถึง image เดิมเสมอ
  • Cleanup policy: เก็บ image ล่าสุด N รายการต่อ repository ลบ image ที่ไม่มี tag หลัง N วัน (ค่าเริ่มต้น 7) ลบ image ที่ไม่มีใคร pull มา N วัน และเก็บ tag ที่ตรงรูปแบบ เช่น v* ไว้เสมอ ระบบทำงานเองทุก 10 นาที และไม่ลบ image ที่ Container รันอยู่หรือเก็บไว้สำหรับย้อนกลับ

ค่าพื้นที่คิดต่อ Project โดยนับแต่ละ layer ครั้งเดียว ไม่ว่าจะอยู่กี่ Registry การคัดลอก image ไป Registry อื่นจึงไม่เพิ่มค่าใช้จ่าย ทุก Registry ของ Project ใช้โควตา Registry ร่วมกัน

คู่มือการใช้งาน

ย้าย image จาก staging ขึ้น production

Shell
th registry create staging
th registry create prod --immutable-tags --keep-tags "v*"
th container deploy api-staging --source . --repository staging/api --tag v1.4.0
th registry images copy staging/api:v1.4.0 prod/api
th container deploy api --image registry.thailandhosting.com/<project>/prod/api:v1.4.0

Build เก็บ image ใน Registry staging และรันเป็น api-staging เมื่อทดสอบแล้ว การคัดลอกจะนำ image เดิม (digest เดิม) ไปไว้ใน prod แล้ว api จึง Deploy จากที่นั่น เมื่อเปิด Immutable tags ไม่มีใคร push ทับ v1.4.0 ใน prod ได้

Push จาก CI ด้วย Access token

  1. สร้าง Token แบบเขียนของ Registry: th registry tokens create prod --name github-actions --permission write Token แสดงครั้งเดียว เก็บเป็น secret ของ CI ทันที
  2. ใน CI ให้ docker เข้าสู่ระบบด้วย Token นี้ในชื่อผู้ใช้ th แล้ว push
  3. เมื่อไม่ใช้แล้วให้ยกเลิก: th registry tokens revoke prod github-actions
Shell
echo "$TH_REGISTRY_TOKEN" | docker login registry.thailandhosting.com -u th --password-stdin
docker push registry.thailandhosting.com/<project>/prod/api:v1.4.0

คุมพื้นที่ด้วย Cleanup policy

Shell
th registry cleanup default --preview --keep-latest 10 --unpulled-days 30
th registry update default --keep-latest 10 --unpulled-days 30 --keep-tags "v*,prod"
th registry cleanup default --run

--preview พร้อมพารามิเตอร์ของ policy จะแสดงว่า policy นั้นจะลบอะไรโดยยังไม่บันทึก --run ใช้ policy ที่บันทึกไว้ทันทีโดยไม่ต้องรอรอบถัดไป

คำสั่ง

คำสั่งคำอธิบาย
th registry listแสดง Registry ของ Project และพื้นที่ที่ใช้ไปจากโควตา Registry (ทุก Registry ใช้ร่วมกัน)
th registry createสร้าง Registry ใน Project
th registry describeแสดงการตั้งค่า Cleanup policy และ repository ของ Registry
th registry updateเปลี่ยนการตั้งค่าของ Registry ค่าที่ไม่ได้ระบุจะคงเดิม
th registry images listแสดง image ของ repository เรียงจากใหม่ไปเก่า
th registry images tagชี้ TAG ไปที่ image ใน repository เดียวกัน เช่น เลื่อน Build ขึ้น prod หรือตั้งชื่อ v1.4.0
th registry images copyคัดลอก image ไป repository หรือ Registry อื่นของ Project เช่น เลื่อนจาก staging ขึ้น prod
th registry images deleteIMAGE คือ REPOSITORY:TAG (ลบเฉพาะ tag), REPOSITORY@sha256:DIGEST หรือ REPOSITORY@ ตามด้วยเลขฐานสิบหก 7 ตัวแรกขึ้นไปของ digest (ลบ image และทุก tag) หรือชื่อเต็ม <host>/<project>/REPOSITORY[:TAG|@DIGEST]
th registry tokens createสร้าง Access token ที่ให้ docker, CI หรือเซิร์ฟเวอร์ที่อื่นเข้าสู่ Registry นี้เท่านั้น: read = pull, write = push และ pull
th registry tokens listแสดง Access token ของ Registry
th registry tokens revokeยกเลิก Access token ด้วย ID หรือชื่อ (ดูจาก th registry tokens list) ใช้ไม่ได้ทันที
th registry cleanupดูหรือใช้ Cleanup policy ของ Registry ทันที (ปกติระบบทำงานเองทุก 10 นาที)
th registry deleteลบ Registry พร้อมทุก repository, image และ Access token

th registry list

แสดง Registry ของ Project และพื้นที่ที่ใช้ไปจากโควตา Registry (ทุก Registry ใช้ร่วมกัน)

ไวยากรณ์

Shell
th registry list

default คือ Registry ที่ Build เก็บ image

ตัวอย่าง

Registry ของ Project และพื้นที่ที่ใช้

Shell
th registry list

พารามิเตอร์ส่วนกลาง

คำสั่งนี้รับพารามิเตอร์ส่วนกลางด้วย: --project, --region, --endpoint, --format, --quiet

กลับขึ้นด้านบน ↑

th registry create

สร้าง Registry ใน Project

ไวยากรณ์

Shell
th registry create REGISTRY [--description TEXT] [--public]
    [--immutable-tags] [--keep-latest N] [--untagged-days N]
    [--unpulled-days N] [--keep-tags PATTERNS]

ชื่อใช้ตัวพิมพ์เล็ก ตัวเลข และ - ได้ 1–40 ตัว ขึ้นต้นและลงท้ายด้วยตัวอักษรหรือตัวเลข (ใช้ชื่อ default ไม่ได้) image ของ Registry คือ <host>/<project>/REGISTRY/<image> push ด้วย docker หลัง th auth configure-docker หรือ build เข้าไปด้วย th container deploy --repository REGISTRY/<image>

การ Cleanup ไม่ลบ image ที่ Container รันอยู่หรือเก็บไว้สำหรับย้อนกลับ พื้นที่จะว่างเมื่อไม่มี image อื่นใช้ layer เดียวกันแล้ว

ตัวอย่าง

Registry production ที่ tag ไม่เปลี่ยน

Shell
th registry create prod --immutable-tags --keep-tags "v*"

ทุกคน pull ได้

Shell
th registry create public-images --public --description "Images we ship"

เก็บ 10 image ต่อ repository และลบที่ไม่มีใคร pull

Shell
th registry create staging --keep-latest 10 --unpulled-days 30

อาร์กิวเมนต์ตามตำแหน่ง

ชื่อคำอธิบาย
REGISTRYจำเป็นชื่อ Registry ตามที่ th registry list แสดง default คือ Registry หลักของ Project

พารามิเตอร์

ชื่อชนิดค่าเริ่มต้นคำอธิบาย
--descriptionข้อความRegistry นี้ใช้ทำอะไร (ไม่เกิน 200 ตัวอักษร)
--publicแฟล็กให้ทุกคน pull ได้โดยไม่ต้องเข้าสู่ระบบ (--no-public = ต้องเข้าสู่ระบบหรือใช้ Token)
--immutable-tagsแฟล็กtag ที่ push แล้วจะไม่ย้ายไป image อื่น ยกเว้น latest
--keep-latestตัวเลขเก็บ image ล่าสุด N รายการของแต่ละ repository (0 = ไม่จำกัด)
--untagged-daysตัวเลขลบ image ที่ไม่มี tag เมื่อเก่ากว่า N วัน (1–365 ค่าเริ่มต้น 7)
--unpulled-daysตัวเลขลบ image ที่ไม่มีใคร pull มา N วัน (7–730, 0 = ปิด)
--keep-tagsรายการรูปแบบ tag ที่เก็บไว้เสมอ คั่นด้วยจุลภาค เช่น v*,prod (none = ล้าง)

พารามิเตอร์ส่วนกลาง

คำสั่งนี้รับพารามิเตอร์ส่วนกลางด้วย: --project, --region, --endpoint, --format, --quiet

กลับขึ้นด้านบน ↑

th registry describe

แสดงการตั้งค่า Cleanup policy และ repository ของ Registry

ไวยากรณ์

Shell
th registry describe REGISTRY

ตัวอย่าง

การตั้งค่า Cleanup policy และ repository

Shell
th registry describe prod

อาร์กิวเมนต์ตามตำแหน่ง

ชื่อคำอธิบาย
REGISTRYจำเป็นชื่อ Registry ตามที่ th registry list แสดง default คือ Registry หลักของ Project

พารามิเตอร์ส่วนกลาง

คำสั่งนี้รับพารามิเตอร์ส่วนกลางด้วย: --project, --region, --endpoint, --format, --quiet

กลับขึ้นด้านบน ↑

th registry update

เปลี่ยนการตั้งค่าของ Registry ค่าที่ไม่ได้ระบุจะคงเดิม

ไวยากรณ์

Shell
th registry update REGISTRY [--description TEXT] [--public|--no-public]
    [--immutable-tags|--no-immutable-tags] [--keep-latest N]
    [--untagged-days N] [--unpulled-days N] [--keep-tags PATTERNS|none]

ดูก่อนว่า Cleanup policy ใหม่จะลบอะไรด้วย th registry cleanup REGISTRY --preview พร้อมพารามิเตอร์ชุดเดียวกัน

การ Cleanup ไม่ลบ image ที่ Container รันอยู่หรือเก็บไว้สำหรับย้อนกลับ พื้นที่จะว่างเมื่อไม่มี image อื่นใช้ layer เดียวกันแล้ว

ตัวอย่าง

ล็อก tag

Shell
th registry update prod --immutable-tags

เปลี่ยน Cleanup policy ของ Registry หลัก

Shell
th registry update default --keep-latest 20 --keep-tags "v*,prod"

กลับเป็นส่วนตัว และไม่เก็บรูปแบบ tag ใดไว้

Shell
th registry update staging --no-public --keep-tags none

อาร์กิวเมนต์ตามตำแหน่ง

ชื่อคำอธิบาย
REGISTRYจำเป็นชื่อ Registry ตามที่ th registry list แสดง default คือ Registry หลักของ Project

พารามิเตอร์

ชื่อชนิดค่าเริ่มต้นคำอธิบาย
--descriptionข้อความRegistry นี้ใช้ทำอะไร (ไม่เกิน 200 ตัวอักษร)
--publicแฟล็กให้ทุกคน pull ได้โดยไม่ต้องเข้าสู่ระบบ (--no-public = ต้องเข้าสู่ระบบหรือใช้ Token)
--immutable-tagsแฟล็กtag ที่ push แล้วจะไม่ย้ายไป image อื่น ยกเว้น latest
--keep-latestตัวเลขเก็บ image ล่าสุด N รายการของแต่ละ repository (0 = ไม่จำกัด)
--untagged-daysตัวเลขลบ image ที่ไม่มี tag เมื่อเก่ากว่า N วัน (1–365 ค่าเริ่มต้น 7)
--unpulled-daysตัวเลขลบ image ที่ไม่มีใคร pull มา N วัน (7–730, 0 = ปิด)
--keep-tagsรายการรูปแบบ tag ที่เก็บไว้เสมอ คั่นด้วยจุลภาค เช่น v*,prod (none = ล้าง)

พารามิเตอร์ส่วนกลาง

คำสั่งนี้รับพารามิเตอร์ส่วนกลางด้วย: --project, --region, --endpoint, --format, --quiet

กลับขึ้นด้านบน ↑

th registry images list

แสดง image ของ repository เรียงจากใหม่ไปเก่า

ไวยากรณ์

Shell
th registry images list REPOSITORY

REPOSITORY คือ IMAGE สำหรับ Registry หลัก (ที่ Build เก็บ image) หรือ REGISTRY/IMAGE สำหรับ Registry อื่น เช่น api หรือ prod/api USED BY คือ Container ที่รัน image นั้นอยู่ KEPT=yes หมายถึงมี Container รันอยู่หรือมี Revision เก็บไว้สำหรับย้อนกลับ Cleanup จึงไม่ลบ

ดู repository ของ Registry ด้วย th registry describe REGISTRY

ตัวอย่าง

image ของ api ใน Registry หลัก

Shell
th registry images list api

image ของ api ใน Registry prod

Shell
th registry images list prod/api

อาร์กิวเมนต์ตามตำแหน่ง

ชื่อคำอธิบาย
REPOSITORYจำเป็นIMAGE ใน Registry หลัก หรือ REGISTRY/IMAGE ใน Registry อื่น เช่น api หรือ prod/api

พารามิเตอร์ส่วนกลาง

คำสั่งนี้รับพารามิเตอร์ส่วนกลางด้วย: --project, --region, --endpoint, --format, --quiet

กลับขึ้นด้านบน ↑

th registry images tag

ชี้ TAG ไปที่ image ใน repository เดียวกัน เช่น เลื่อน Build ขึ้น prod หรือตั้งชื่อ v1.4.0

ไวยากรณ์

Shell
th registry images tag IMAGE TAG

IMAGE คือ REPOSITORY:TAG หรือ REPOSITORY@DIGEST (เลขฐานสิบหก 7 ตัวก็พอ) REPOSITORY คือ IMAGE สำหรับ Registry หลัก (ที่ Build เก็บ image) หรือ REGISTRY/IMAGE สำหรับ Registry อื่น เช่น api หรือ prod/api

ใน Registry ที่เปิด Immutable tags tag ที่มีอยู่แล้วจะย้ายไม่ได้ (ยกเว้น latest) และ tag ที่ Container รันด้วยชื่อนั้นอยู่ก็ย้ายไม่ได้

ตัวอย่าง

ตั้งชื่อ Build ล่าสุดเป็น v1.4.0

Shell
th registry images tag api:latest v1.4.0

ชี้ stable ไปที่ image ด้วย digest

Shell
th registry images tag prod/api@3f2a9c1 stable

อาร์กิวเมนต์ตามตำแหน่ง

ชื่อคำอธิบาย
IMAGEจำเป็นREPOSITORY:TAG หรือ REPOSITORY@DIGEST (เลขฐานสิบหก 7 ตัวแรกขึ้นไปของ digest ก็พอ) หรือชื่อเต็ม <host>/<project>/REPOSITORY…
TAGจำเป็นtag: ตัวอักษร ตัวเลข _ . และ - ไม่เกิน 128 ตัว ห้ามขึ้นต้นด้วย . หรือ -

พารามิเตอร์ส่วนกลาง

คำสั่งนี้รับพารามิเตอร์ส่วนกลางด้วย: --project, --region, --endpoint, --format, --quiet

กลับขึ้นด้านบน ↑

th registry images copy

คัดลอก image ไป repository หรือ Registry อื่นของ Project เช่น เลื่อนจาก staging ขึ้น prod

ไวยากรณ์

Shell
th registry images copy SRC DST

SRC คือ REPOSITORY:TAG หรือ REPOSITORY@DIGEST DST คือ REPOSITORY[:TAG] REPOSITORY คือ IMAGE สำหรับ Registry หลัก (ที่ Build เก็บ image) หรือ REGISTRY/IMAGE สำหรับ Registry อื่น เช่น api หรือ prod/api

ถ้า DST ไม่มี tag จะใช้ tag ของ SRC หรือเก็บเฉพาะ digest เมื่อระบุ SRC ด้วย digest layer ใช้ร่วมกัน ไม่เก็บซ้ำ การคัดลอกจึงไม่เพิ่มค่าพื้นที่

ตัวอย่าง

เลื่อน v1.4.0 ขึ้น prod

Shell
th registry images copy staging/api:v1.4.0 prod/api

คัดลอก Build ไป prod ในชื่อ stable

Shell
th registry images copy api@3f2a9c1 prod/api:stable

อาร์กิวเมนต์ตามตำแหน่ง

ชื่อคำอธิบาย
SRCจำเป็นimage ที่จะคัดลอก: REPOSITORY:TAG หรือ REPOSITORY@DIGEST
DSTจำเป็นปลายทาง: REPOSITORY หรือ REPOSITORY:TAG

พารามิเตอร์ส่วนกลาง

คำสั่งนี้รับพารามิเตอร์ส่วนกลางด้วย: --project, --region, --endpoint, --format, --quiet

กลับขึ้นด้านบน ↑

th registry images delete

IMAGE คือ REPOSITORY:TAG (ลบเฉพาะ tag), REPOSITORY@sha256:DIGEST หรือ REPOSITORY@ ตามด้วยเลขฐานสิบหก 7 ตัวแรกขึ้นไปของ digest (ลบ image และทุก tag) หรือชื่อเต็ม <host>/<project>/REPOSITORY[:TAG|@DIGEST]

ไวยากรณ์

Shell
th registry images delete IMAGE [--quiet]

REPOSITORY คือ IMAGE สำหรับ Registry หลัก (ที่ Build เก็บ image) หรือ REGISTRY/IMAGE สำหรับ Registry อื่น เช่น api หรือ prod/api

image ที่ Container รันอยู่จะลบไม่ได้ --quiet ข้ามการยืนยัน

ตัวอย่าง

ลบ tag

Shell
th registry images delete prod/api:v1.3

ลบ image และทุก tag ด้วย digest

Shell
th registry images delete api@3f2a9c1

อาร์กิวเมนต์ตามตำแหน่ง

ชื่อคำอธิบาย
IMAGEจำเป็นREPOSITORY:TAG หรือ REPOSITORY@DIGEST (เลขฐานสิบหก 7 ตัวแรกขึ้นไปของ digest ก็พอ) หรือชื่อเต็ม <host>/<project>/REPOSITORY…

พารามิเตอร์ส่วนกลาง

คำสั่งนี้รับพารามิเตอร์ส่วนกลางด้วย: --project, --region, --endpoint, --format, --quiet

กลับขึ้นด้านบน ↑

th registry tokens create

สร้าง Access token ที่ให้ docker, CI หรือเซิร์ฟเวอร์ที่อื่นเข้าสู่ Registry นี้เท่านั้น: read = pull, write = push และ pull

ไวยากรณ์

Shell
th registry tokens create REGISTRY --name NAME [--permission read|write]
    [--expires-in-days N]

Token แสดงครั้งเดียวทาง standard output เก็บไว้ทันที เข้าสู่ระบบด้วยชื่อผู้ใช้ th:

echo "$TOKEN" | docker login <host> -u th --password-stdin

ตัวอย่าง

Token ที่ CI ใช้ push

Shell
th registry tokens create prod --name github-actions --permission write

Token สำหรับ pull ที่หมดอายุใน 90 วัน

Shell
th registry tokens create prod --name edge-server --expires-in-days 90

อาร์กิวเมนต์ตามตำแหน่ง

ชื่อคำอธิบาย
REGISTRYจำเป็นชื่อ Registry ตามที่ th registry list แสดง default คือ Registry หลักของ Project

พารามิเตอร์

ชื่อชนิดค่าเริ่มต้นคำอธิบาย
--nameจำเป็นข้อความชื่อ Token เช่น github-actions (1–60 ตัวอักษร)
--permissionข้อความreadสิทธิ์ของ Token: read = pull, write = push และ pull
--expires-in-daysตัวเลขจำนวนวันจนกว่า Token หมดอายุ (1–730, 0 = ไม่หมดอายุ)

พารามิเตอร์ส่วนกลาง

คำสั่งนี้รับพารามิเตอร์ส่วนกลางด้วย: --project, --region, --endpoint, --format, --quiet

กลับขึ้นด้านบน ↑

th registry tokens list

แสดง Access token ของ Registry

ไวยากรณ์

Shell
th registry tokens list REGISTRY

Token แสดงครั้งเดียวตอนสร้าง HINT คือตัวอักษรท้ายของ Token ไว้แยกว่าเป็นอันไหน

ตัวอย่าง

Access token ของ Registry

Shell
th registry tokens list prod

อาร์กิวเมนต์ตามตำแหน่ง

ชื่อคำอธิบาย
REGISTRYจำเป็นชื่อ Registry ตามที่ th registry list แสดง default คือ Registry หลักของ Project

พารามิเตอร์ส่วนกลาง

คำสั่งนี้รับพารามิเตอร์ส่วนกลางด้วย: --project, --region, --endpoint, --format, --quiet

กลับขึ้นด้านบน ↑

th registry tokens revoke

ยกเลิก Access token ด้วย ID หรือชื่อ (ดูจาก th registry tokens list) ใช้ไม่ได้ทันที

ไวยากรณ์

Shell
th registry tokens revoke REGISTRY TOKEN [--quiet]

--quiet ข้ามการยืนยัน

ตัวอย่าง

ยกเลิก Token ด้วยชื่อ

Shell
th registry tokens revoke prod github-actions

อาร์กิวเมนต์ตามตำแหน่ง

ชื่อคำอธิบาย
REGISTRYจำเป็นชื่อ Registry ตามที่ th registry list แสดง default คือ Registry หลักของ Project
TOKENจำเป็นID หรือชื่อของ Access token จาก th registry tokens list

พารามิเตอร์ส่วนกลาง

คำสั่งนี้รับพารามิเตอร์ส่วนกลางด้วย: --project, --region, --endpoint, --format, --quiet

กลับขึ้นด้านบน ↑

th registry cleanup

ดูหรือใช้ Cleanup policy ของ Registry ทันที (ปกติระบบทำงานเองทุก 10 นาที)

ไวยากรณ์

Shell
th registry cleanup REGISTRY --preview|--run [--keep-latest N]
    [--untagged-days N] [--unpulled-days N] [--keep-tags PATTERNS|none]

--preview แสดงว่า policy ที่บันทึกไว้จะลบอะไรตอนนี้ ถ้าใส่พารามิเตอร์ของ policy ด้วยจะแสดงผลของ policy นั้นโดยไม่บันทึก (บันทึกด้วย th registry update) --run ใช้ policy ที่บันทึกไว้ทันทีและถามยืนยันก่อน (--quiet ข้ามการยืนยัน)

การ Cleanup ไม่ลบ image ที่ Container รันอยู่หรือเก็บไว้สำหรับย้อนกลับ พื้นที่จะว่างเมื่อไม่มี image อื่นใช้ layer เดียวกันแล้ว

ตัวอย่าง

policy ที่บันทึกไว้จะลบอะไรตอนนี้

Shell
th registry cleanup default --preview

ลอง policy ก่อนบันทึก

Shell
th registry cleanup default --preview --keep-latest 5 --unpulled-days 30

ใช้ policy ที่บันทึกไว้ทันที

Shell
th registry cleanup staging --run

อาร์กิวเมนต์ตามตำแหน่ง

ชื่อคำอธิบาย
REGISTRYจำเป็นชื่อ Registry ตามที่ th registry list แสดง default คือ Registry หลักของ Project

พารามิเตอร์

ชื่อชนิดค่าเริ่มต้นคำอธิบาย
--previewแฟล็กแสดงสิ่งที่จะถูกลบ โดยไม่ลบอะไร
--runแฟล็กใช้ policy ที่บันทึกไว้ทันที
--keep-latestตัวเลขเก็บ image ล่าสุด N รายการของแต่ละ repository (0 = ไม่จำกัด)
--untagged-daysตัวเลขลบ image ที่ไม่มี tag เมื่อเก่ากว่า N วัน (1–365 ค่าเริ่มต้น 7)
--unpulled-daysตัวเลขลบ image ที่ไม่มีใคร pull มา N วัน (7–730, 0 = ปิด)
--keep-tagsรายการรูปแบบ tag ที่เก็บไว้เสมอ คั่นด้วยจุลภาค เช่น v*,prod (none = ล้าง)

พารามิเตอร์ส่วนกลาง

คำสั่งนี้รับพารามิเตอร์ส่วนกลางด้วย: --project, --region, --endpoint, --format, --quiet

กลับขึ้นด้านบน ↑

th registry delete

ลบ Registry พร้อมทุก repository, image และ Access token

ไวยากรณ์

Shell
th registry delete REGISTRY [--quiet]

Registry หลักลบไม่ได้ และ Registry ที่มี Container รัน image อยู่ก็ลบไม่ได้ --quiet ข้ามการยืนยัน

ตัวอย่าง

ลบหลังยืนยัน

Shell
th registry delete staging

อาร์กิวเมนต์ตามตำแหน่ง

ชื่อคำอธิบาย
REGISTRYจำเป็นชื่อ Registry ตามที่ th registry list แสดง default คือ Registry หลักของ Project

พารามิเตอร์ส่วนกลาง

คำสั่งนี้รับพารามิเตอร์ส่วนกลางด้วย: --project, --region, --endpoint, --format, --quiet

กลับขึ้นด้านบน ↑