-
Clone locally kustomize project:
git clone https://github.com/kubernetes-sigs/kustomize
cd kustomize
-
Build the container image locally (add
time
as a prefix for Mac/Linux):KUSTOMIZE_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
docker build --build-arg="VERSION=v0.1.0" --build-arg="DATE=v0.0.1" --build-arg="DATE=$KUSTOMIZE_DATE" -t kustomize-local:0.1.0 -f kustomize.Dockerfile .
Check the image size:
docker image ls
Check the artifact contents:
docker history kustomize-local:0.1.0
-
Digests, manifests and immutable tags
Kustomize image created locally doesn't have a digest:
docker image ls --digests
Image with manifest:
docker image pull alpine:3.19.1
docker manifest inspect alpine:3.19.1
Pull with digest:
docker image pull alpine@sha256:6457d53fb065d6f250e1504b9bc42d5b6c65941d57532c072d929dd0628977d0
-
Configuration
docker save alpine:3.19.1 > alpine_3_19_1.tar
mkdir alpine_3_19_1
tar -xzvf alpine_3_19_1.tar -C alpine_3_19_1
cd alpine_3_19_1
manifest.json: reference to config file and layers files digest calculated from config file
-
Layers
docker save kustomize-local:0.1.0 > kustomize_local_0_1_0.tar
mkdir kustomize-local
tar -xzvf kustomize_local_0_1_0.tar -C kustomize-local
Untar a layer and check its content
cd kustomize-local/a99f89fe89f30e24c9cef7b8d6c6cbde16bc74aef975ccd1e832873aa5e0d252
mkdir layer
tar -xzvf layer.tar -C layer
./layer/app/kustomize