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