Skip to content

Commit 3feda81

Browse files
hiddecophillebaba
authored andcommitted
Tweak musl and libgit2{-dev} dependencies
* Use semver tidles to deal with future patch releases * Install just `libgit2` in runtime container * Add TODO / explanation for `musl` `1.2.x` dependency Signed-off-by: Hidde Beydals <[email protected]>
1 parent 7945f95 commit 3feda81

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/actions/run-tests/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM golang:1.15-alpine
22

33
# Add any build or testing essential system packages
44
RUN apk add --no-cache build-base git pkgconf
5-
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community libgit2-dev~=1.1.0
5+
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community libgit2-dev~=1.1
66

77
# Use the GitHub Actions uid:gid combination for proper fs permissions
88
RUN addgroup -g 116 -S test && adduser -u 1001 -S -g test test

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
FROM golang:1.15-alpine as builder
33

44
RUN apk add gcc pkgconfig libc-dev
5-
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community libgit2-dev~=1.1.0
6-
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main musl=1.2.2_pre5-r0
5+
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community libgit2-dev~=1.1
6+
# TODO: replace with non-edge musl 1.2.x when made available
7+
# musl 1.2.x is a strict requirement of libgit2 due to time_t changes
8+
# ref: https://musl.libc.org/time64.html
9+
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main musl~=1.2
710

811
WORKDIR /workspace
912

@@ -32,7 +35,7 @@ FROM alpine:3.12
3235
LABEL org.opencontainers.image.source="https://github.com/fluxcd/source-controller"
3336

3437
RUN apk add --no-cache ca-certificates tini
35-
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community libgit2-dev~=1.1.0
38+
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community libgit2~=1.1
3639

3740
COPY --from=builder /workspace/source-controller /usr/local/bin/
3841

0 commit comments

Comments
 (0)