11FROM golang:1.16-buster as builder
22
33# Up-to-date libgit2 dependencies are only available in
4- # >=bullseye (testing).
5- RUN echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list \
6- && echo "deb-src http://deb.debian.org/debian testing main" >> /etc/apt/sources.list
4+ # unstable, as libssh2 in testing/bullseye has been linked
5+ # against gcrypt which causes issues with PKCS* formats.
6+ # Explicitly listing all build dependencies is required because
7+ # they can only be automagically found for AMD64 builds.
8+ # Ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668271
9+ RUN echo "deb http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list \
10+ && echo "deb-src http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list
711RUN set -eux; \
812 apt-get update \
9- && apt-get install -y libgit2-dev/testing zlib1g-dev/testing libssh2-1-dev/testing libpcre3-dev/testing \
13+ && apt-get install -y \
14+ libgit2-dev/unstable \
15+ zlib1g-dev/unstable \
16+ libssh2-1-dev/unstable \
17+ libpcre3-dev/unstable \
1018 && apt-get clean \
1119 && apt-get autoremove --purge -y \
1220 && rm -rf /var/lib/apt/lists/*
@@ -38,12 +46,16 @@ FROM debian:buster-slim as controller
3846LABEL org.opencontainers.image.source="https://github.com/fluxcd/source-controller"
3947
4048# Up-to-date libgit2 dependencies are only available in
41- # >=bullseye (testing).
42- RUN echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list \
43- && echo "deb-src http://deb.debian.org/debian testing main" >> /etc/apt/sources.list
49+ # unstable, as libssh2 in testing/bullseye has been linked
50+ # against gcrypt which causes issues with PKCS* formats.
51+ # Ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668271
52+ RUN echo "deb http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list \
53+ && echo "deb-src http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list
4454RUN set -eux; \
4555 apt-get update \
46- && apt-get install -y ca-certificates libgit2-1.1 \
56+ && apt-get install -y \
57+ ca-certificates \
58+ libgit2-1.1 \
4759 && apt-get clean \
4860 && apt-get autoremove --purge -y \
4961 && rm -rf /var/lib/apt/lists/*
@@ -54,4 +66,4 @@ RUN groupadd controller && \
5466 useradd --gid controller --shell /bin/sh --create-home controller
5567
5668USER controller
57- ENTRYPOINT ["source-controller" ]
69+ ENTRYPOINT [ "source-controller" ]
0 commit comments