diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-25 07:14:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-25 07:14:17 +0000 |
commit | 531e7c3ed0d6ed15be0db22506e9a4dfbcfaf267 (patch) | |
tree | 346c213d4f3150d8334fcf924ddca53b6aacca54 /Dockerfile | |
parent | Initial commit. (diff) | |
download | inotify-info-531e7c3ed0d6ed15be0db22506e9a4dfbcfaf267.tar.xz inotify-info-531e7c3ed0d6ed15be0db22506e9a4dfbcfaf267.zip |
Adding upstream version 0~20240209.upstream/0_20240209
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8acb222 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM alpine + +# zig is installed from the upstream tarball, because: +# - as of writing, alpine has zig only in testing (which is cumbersome to use) +# - apk get zig pulls in libllvm, which is huge. +# +# Upstream tarball is statically linked, making it small and convenient to use. +RUN apk add make \ + && wget https://ziglang.org/download/0.11.0/zig-linux-$(uname -m)-0.11.0.tar.xz \ + && tar -xJf zig-linux-*.tar.xz \ + && rm zig-linux-*.xz \ + && mv zig-linux-* zig + +WORKDIR inotify-info + +COPY . . + +RUN CC="/zig/zig cc -target $(uname -m)-linux-musl" \ + CXX="/zig/zig c++ -target $(uname -m)-linux-musl" \ + make + +FROM scratch +COPY --from=0 /inotify-info/_release/inotify-info /inotify-info + +ENTRYPOINT ["/inotify-info"] |