Skip to content

Commit f6d4942

Browse files
authored
Merge pull request #351 from kzys/agent-in-docker
Build Agent in Docker
2 parents ee86aca + 54a7ed4 commit f6d4942

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ PROTO_BUILDER_NAME?=proto-builder
4848
# Set this to pass additional commandline flags to the go compiler, e.g. "make test EXTRAGOARGS=-v"
4949
export EXTRAGOARGS?=
5050

51-
all: $(SUBDIRS) $(GOMOD) $(GOSUM)
51+
all: $(SUBDIRS) $(GOMOD) $(GOSUM) cni-bins test-cni-bins
5252

5353
$(SUBDIRS):
5454
$(MAKE) -C $@ EXTRAGOARGS=$(EXTRAGOARGS)
5555

56-
all-in-docker:
56+
%-in-docker:
5757
docker run --rm -it \
5858
--user $(UID):$(GID) \
5959
--volume $(CURDIR):/src \
@@ -64,7 +64,7 @@ all-in-docker:
6464
--env STATIC_AGENT=on \
6565
--workdir /src \
6666
$(FIRECRACKER_CONTAINERD_BUILDER_IMAGE) \
67-
$(MAKE) all cni-bins test-cni-bins
67+
$(MAKE) $(subst -in-docker,,$@)
6868

6969
proto:
7070
DOCKER_BUILDKIT=1 docker build \
@@ -107,7 +107,7 @@ deps:
107107
install:
108108
for d in $(SUBDIRS); do $(MAKE) -C $$d install; done
109109

110-
image: $(RUNC_BIN) agent
110+
image: $(RUNC_BIN) agent-in-docker
111111
mkdir -p tools/image-builder/files_ephemeral/usr/local/bin
112112
mkdir -p tools/image-builder/files_ephemeral/var/firecracker-containerd-test/scripts
113113
for f in tools/docker/scripts/*; do test -f $$f && install -m 755 $$f tools/image-builder/files_ephemeral/var/firecracker-containerd-test/scripts; done

0 commit comments

Comments
 (0)