Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Load all images into containerd #435

Merged
merged 1 commit into from
Sep 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ endif
$(DOCKER) build -t $(IMAGE):${IMAGE_DEV_TAG}-$(GOARCH) \
--build-arg FIRECRACKER_VERSION=${FIRECRACKER_VERSION} \
--build-arg ARCH_SUFFIX=${ARCH_SUFFIX} bin/$(GOARCH)
# Load the dev image into the host's containerd content store
$(DOCKER) image save $(IMAGE):${IMAGE_DEV_TAG}-$(GOARCH) \
| $(CTR) -n firecracker image import -
ifeq ($(GOARCH),$(GOHOSTARCH))
# Only tag the development image if its architecture matches the host
$(DOCKER) tag $(IMAGE):${IMAGE_DEV_TAG}-$(GOARCH) $(IMAGE):${IMAGE_DEV_TAG}
Expand All @@ -109,10 +112,16 @@ ifeq ($(GOARCH),$(GOHOSTARCH))
endif
ifeq ($(IS_DIRTY),0)
$(DOCKER) tag $(IMAGE):${IMAGE_DEV_TAG}-$(GOARCH) $(IMAGE):${IMAGE_TAG}-$(GOARCH)
# Load the dev image into the host's containerd content store
$(DOCKER) image save $(IMAGE):${IMAGE_TAG}-$(GOARCH) \
| $(CTR) -n firecracker image import -
ifeq ($(GOARCH),$(GOHOSTARCH))
# For dev builds for a clean (non-dirty) environment; "simulate" that
# a manifest list has been built by tagging the docker image
$(DOCKER) tag $(IMAGE):${IMAGE_TAG}-$(GOARCH) $(IMAGE):${IMAGE_TAG}
# Load the dev image into the host's containerd content store
$(DOCKER) image save $(IMAGE):${IMAGE_TAG} \
| $(CTR) -n firecracker image import -
endif
endif
ifeq ($(IS_CI_BUILD),1)
Expand Down