1
1
FROM golang:1.16-buster as builder
2
2
3
3
# 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
7
11
RUN set -eux; \
8
12
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 \
10
18
&& apt-get clean \
11
19
&& apt-get autoremove --purge -y \
12
20
&& rm -rf /var/lib/apt/lists/*
@@ -38,12 +46,16 @@ FROM debian:buster-slim as controller
38
46
LABEL org.opencontainers.image.source="https://github.com/fluxcd/source-controller"
39
47
40
48
# 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
44
54
RUN set -eux; \
45
55
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 \
47
59
&& apt-get clean \
48
60
&& apt-get autoremove --purge -y \
49
61
&& rm -rf /var/lib/apt/lists/*
@@ -54,4 +66,4 @@ RUN groupadd controller && \
54
66
useradd --gid controller --shell /bin/sh --create-home controller
55
67
56
68
USER controller
57
- ENTRYPOINT ["source-controller" ]
69
+ ENTRYPOINT [ "source-controller" ]
0 commit comments