diff --git a/Dockerfile b/Dockerfile index 5d3b1ba484d8..d96acbaa4558 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,9 @@ RUN echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-9 main" >> /etc/ (for tool in "clang" "llc" "llvm-strip"; do path=$(which $tool-9) && ln -s $path ${path%-*}; done) WORKDIR /tracee +ARG VERSION FROM tracee-builder as build +ENV VERSION=$VERSION COPY . /tracee RUN make build diff --git a/Makefile b/Makefile index f3a335a73c24..0b1d4ac15eb4 100644 --- a/Makefile +++ b/Makefile @@ -152,11 +152,11 @@ check_%: .PHONY: docker docker: - $(CMD_DOCKER) build -t $(OUT_DOCKER):latest . + $(CMD_DOCKER) build --build-arg VERSION=$(VERSION) -t $(OUT_DOCKER):latest . .PHONY: docker-slim docker-slim: - $(CMD_DOCKER) build -t $(OUT_DOCKER):slim --build-arg BASE=slim . + $(CMD_DOCKER) build --build-arg VERSION=$(VERSION) -t $(OUT_DOCKER):slim --build-arg BASE=slim . # release_docker_image accepts a local docker image reference (first argument), pushes it under a new name (second argument) to remote repository, and records it in the release notes define release_docker_image