-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the debian based version the default
Maybe having openssl compiled into a static binrary is not what I want anyway (Docker does suffer from this problem either way, but I don't want that responsibility)
- Loading branch information
Showing
3 changed files
with
35 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM gentoo/portage:latest as portage | ||
FROM liftm/gentoo-uclibc:static as builder | ||
COPY --from=portage /usr/portage /usr/portage | ||
|
||
RUN emerge --autounmask-write --autounmask-continue --tree --verbose \ | ||
kafkacat meson dev-util/ninja app-arch/zstd app-arch/lz4 dev-libs/cyrus-sasl jq | ||
|
||
WORKDIR /opt/kafkacat | ||
COPY . . | ||
RUN true \ | ||
&& ver=$(sed -rn "H;1h;\$!d;x;s/^.*project\([^)]*kafkacat[^)]*version:[ \t]*'([^']+)'.*$/\1/p" meson.build) \ | ||
&& wget https://github.com/edenhill/kafkacat/archive/$ver.tar.gz -O/opt/src.tgz \ | ||
&& tar --strip-components=1 -xvf /opt/src.tgz \ | ||
&& meson build --wrap-mode forcefallback -Ddefault_library=static -Dstatic=true \ | ||
&& test "$(meson introspect --projectinfo build | jq -r .version)" == $ver \ | ||
&& ninja -C build kafkacat \ | ||
&& ldd build/kafkacat | grep -q 'not.*dynamic' | ||
|
||
FROM scratch | ||
USER 1000 | ||
ENTRYPOINT ["/kafkacat"] | ||
COPY --from=builder /opt/kafkacat/build/kafkacat / |