Skip to content

Commit 5ac8e58

Browse files
committed
fix(logger): kill temporary build container in "make build"
The two-stage Dockerfile build process leaves a temporary container running after logger builds. This changes the Makefile to catch and kill the temporary logger-build container.
1 parent f5105e1 commit 5ac8e58

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

logger/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ BUILD_IMAGE := $(COMPONENT)-build
66
DEV_IMAGE = $(DEV_REGISTRY)/$(IMAGE)
77

88
build: check-docker
9-
docker build -t $(BUILD_IMAGE) .
10-
docker cp `docker run -d $(BUILD_IMAGE)`:/go/bin/logger image/bin/
9+
docker build -t $(BUILD_IMAGE) .
10+
@$(eval CID := $(shell docker run -d $(BUILD_IMAGE)))
11+
docker cp $(CID):/go/bin/logger image/bin/
1112
docker build -t $(IMAGE) image
13+
-docker kill $(CID)
1214
rm -rf image/bin/logger
1315

1416
clean: check-docker check-registry

0 commit comments

Comments
 (0)