docker buildx imagetools create
docker buildx imagetools create
docker buildx imagetools create는 소스 이미지들을 바탕으로 새 이미지를 만드는 명령이에요. 여러 플랫폼 매니페스트를 합치거나 주석을 추가할 때 사용해요.
출처: 문서
본문
docker buildx imagetools create는 하나 이상의 소스 이미지에서 새 이미지를 생성해요. --tag로 참조를 지정하고, --append로 기존 manifest list에 소스를 추가하며, --annotation으로 주석을 달 수 있어요.
지원하는 옵션은 다음과 같아요.
| 옵션 | 기본값 | 설명 |
|---|---|---|
--annotation |
컨테이너에 주석(annotation)을 추가해요 (OCI 런타임으로 전달돼요) | |
--append |
변경하는 대신 빌더에 노드를 추가해요 | |
--dry-run |
푸시 대신 최종 이미지를 보여줘요 | |
-f, --file |
빌드 정의 파일 | |
--metadata-file |
빌드 결과 메타데이터를 파일에 기록해요 | |
-p, --platform |
서버가 멀티플랫폼을 지원하면 플랫폼을 설정해요 | |
--prefer-index |
true |
소스가 하나뿐일 때 인덱스 출력을 우선해요 |
--progress |
auto |
진행 출력 유형을 설정해요 (auto, none, plain, quiet, rawjson, tty) |
-t, --tag |
새 이미지 참조를 설정해요 (형식: [registry/]repository[:tag]) |
Add annotations to an image (--annotation)
--annotation=[type=]key=value
이미지에 OCI 주석을 추가해요.
$ docker buildx imagetools create --annotation com.example.foo=bar -t example.com/foo:latest source
Append new sources to an existing manifest list (--append)
--append로 기존 manifest list에 소스를 추가해요.
$ docker buildx imagetools create --append -t example.com/foo:latest source1 source2
Override the configured builder instance (--builder)
buildx --builder와 동일해요.
Show final image instead of pushing (--dry-run)
--dry-run으로 결과를 푸시하지 않고 보여줘요.
$ docker buildx imagetools create -t example.com/foo:latest --dry-run source
Read source descriptor from a file (-f, --file)
-f / --file로 소스 디스크립터를 파일에서 읽어요.
Write create result metadata to a file (--metadata-file)
--metadata-file로 결과 메타데이터를 파일에 기록해요.
Set reference for new image (-t, --tag)
-t / --tag로 새 이미지의 참조를 설정해요.