Skip to content

Commit 2c0e648

Browse files
djs55claude
andcommitted
docker: install static zstd for OCaml 5.x static linking
OCaml 5.x compiler-libs link against zstd; combined with the static link (-ccopt -static) the Alpine build needs libzstd.a, which isn't present by default. Add zstd-static to both Dockerfiles. Fixes 'ld: cannot find -lzstd' in the bin-image and Dockerfile.test builds. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: David Scott <dave@recoil.org>
1 parent d36e3fa commit 2c0e648

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM ocaml/opam:alpine-ocaml-5.3 AS build
22
RUN opam update
3+
# Static zstd is needed because OCaml 5.x compiler-libs link against zstd and
4+
# the binary is statically linked (see src/bin/config/discover.ml).
5+
RUN sudo apk add --no-cache zstd-static
36

47
ADD . /home/opam/vpnkit
58
RUN opam pin add vpnkit /home/opam/vpnkit --kind=path -n

Dockerfile.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM ocaml/opam:alpine-ocaml-5.3 AS build
22
RUN opam update
3+
# Static zstd is needed because OCaml 5.x compiler-libs link against zstd and
4+
# the binary is statically linked (see src/bin/config/discover.ml).
5+
RUN sudo apk add --no-cache zstd-static
36

47
ADD . /home/opam/vpnkit
58
RUN sudo chown opam:opam -R vpnkit

0 commit comments

Comments
 (0)