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

Commit

Permalink
Merge pull request #435 from stealthybox/make-load-images
Browse files Browse the repository at this point in the history
Load all images into containerd
  • Loading branch information
chanwit authored Sep 18, 2019
2 parents e66ca30 + 45cd446 commit 06f4cbd
Showing 1 changed file with 9 additions and 0 deletions.
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

0 comments on commit 06f4cbd

Please sign in to comment.