From f5d3aa233cda2d5432c08ae7fd9c206f59368937 Mon Sep 17 00:00:00 2001 From: Roberto Dip Date: Fri, 4 Nov 2022 13:20:38 -0300 Subject: [PATCH] reduce the build time of loadtest.Dockerfile (#8584) - yarn is not needed to build osquery-perf - we can change the clone step to not fetch unnecessary data --- .../loadtesting/terraform/docker/loadtest.Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/infrastructure/loadtesting/terraform/docker/loadtest.Dockerfile b/infrastructure/loadtesting/terraform/docker/loadtest.Dockerfile index cc4214d23..5ff72d7b9 100644 --- a/infrastructure/loadtesting/terraform/docker/loadtest.Dockerfile +++ b/infrastructure/loadtesting/terraform/docker/loadtest.Dockerfile @@ -1,7 +1,6 @@ FROM golang:1.19.1 ARG TAG -RUN apt update && apt upgrade -y && apt install npm yarnpkg -y && ln -s /usr/bin/yarnpkg /usr/bin/yarn -RUN git clone -b $TAG https://github.com/fleetdm/fleet.git && cd /go/fleet/cmd/osquery-perf/ && go build . +RUN git clone -b $TAG --depth=1 --no-tags --progress --no-recurse-submodules https://github.com/fleetdm/fleet.git && cd /go/fleet/cmd/osquery-perf/ && go build . FROM golang:1.19.1 COPY --from=0 /go/fleet/cmd/osquery-perf/osquery-perf /go/osquery-perf