From 04ab5b9699213ac87123407c5287456a07c0a31c Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Fri, 17 Sep 2021 19:27:18 +0200 Subject: [PATCH] Test Signed-off-by: Hidde Beydals --- .github/actions/run-tests/Dockerfile | 6 +----- Dockerfile | 13 +++++-------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/actions/run-tests/Dockerfile b/.github/actions/run-tests/Dockerfile index 18c0b3a8a..cbc351d8c 100644 --- a/.github/actions/run-tests/Dockerfile +++ b/.github/actions/run-tests/Dockerfile @@ -3,13 +3,9 @@ FROM golang:1.16-buster as builder # Build dependencies RUN set -eux; \ apt-get update && \ - apt-get install -y \ + apt-get install -y --no-install-recommends \ cmake \ curl \ - gcc \ - libc6-dev \ - make \ - pkg-config \ python3 \ && apt-get clean \ && apt-get autoremove --purge -y \ diff --git a/Dockerfile b/Dockerfile index 8f1f0e645..38af27187 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,21 +7,19 @@ WORKDIR /workspace # Build dependencies RUN set -eux; \ apt-get update && \ - apt-get install -y \ + apt-get install -y --no-install-recommends \ cmake \ curl \ - gcc \ - libc6-dev \ - make \ - pkg-config \ python3 \ && apt-get clean \ && apt-get autoremove --purge -y \ && rm -rf /var/lib/apt/lists/* COPY hack/libgit2-static/CMakeLists.txt hack/libgit2-static/ -COPY hack/libgit2-static/Makefile hack/libgit2-static/ -RUN make -C hack/libgit2-static +RUN mkdir -p hack/libgit2-static/build \ + && cd hack/libgit2-static/build \ + && cmake .. \ + && cmake --build . # copy api submodule COPY api/ api/ @@ -50,7 +48,6 @@ RUN PKG_CONFIG_PATH="$PWD/hack/libgit2-static/build/external/lib/pkgconfig" \ LD_LIBRARY_PATH="$PWD/hack/libgit2-static/build/external/lib/" \ go build -o source-controller \ -tags static,system_libgit2 \ - -ldflags "-linkmode external -extldflags '-static' -s -w" \ main.go FROM debian:buster-slim as controller