mirror of
https://github.com/nine-lives-later/zzmq.git
synced 2024-09-29 04:48:46 +08:00
7db33e0141
Add docker ignore file Add auto-update to building of examples
32 lines
736 B
Docker
32 lines
736 B
Docker
FROM alpine:3.20 as zig
|
|
|
|
ARG ZIG_VERSION=0.13
|
|
|
|
# install Zig 0.13 from Alpine edge community repo: https://pkgs.alpinelinux.org/package/edge/community/x86_64/zig
|
|
RUN echo "@edge-community https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
|
|
RUN echo "@edge-main https://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
|
|
|
|
RUN apk add --no-cache zig@edge-community~=${ZIG_VERSION}.0 clang18@edge-main lld-libs@edge-main
|
|
|
|
|
|
|
|
FROM zig as builder
|
|
|
|
# install dependencies
|
|
RUN apk add --no-cache bash zeromq-dev
|
|
|
|
|
|
|
|
COPY . /build/
|
|
|
|
WORKDIR /build
|
|
|
|
RUN ./build_all_examples.sh
|
|
|
|
RUN touch /var/touched # dummy build output
|
|
|
|
# empty result image
|
|
FROM scratch
|
|
|
|
COPY --from=builder /var/touched /tmp/touched
|