Skip to content

Commit

Permalink
Fixed build issues in test.Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
7Zifle committed Apr 28, 2024
1 parent d66d093 commit 4708ba5
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions test.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
FROM alpine:3.19 as builder

# install Zig 0.11 from Alpine edge repo: https://pkgs.alpinelinux.org/package/edge/testing/x86_64/zig
# Install necessary tools for building musl
RUN apk add --no-cache clang make

# Download musl source code
RUN wget https://musl.libc.org/releases/musl-1.2.4.tar.gz

# Extract the source code
RUN tar -xzvf musl-1.2.4.tar.gz

# Navigate into the musl directory
WORKDIR /musl-1.2.4

# Configure, build, and install musl
RUN ./configure && make && make install

# Cleanup
WORKDIR /
RUN rm -rf /musl-1.2.4 musl-1.2.4.tar.gz

# install Zig 0.12 from Alpine edge repo: https://pkgs.alpinelinux.org/package/edge/testing/x86_64/zig
RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk add --no-cache zig@testing~=0.11.0
RUN apk add --no-cache zig@testing~=0.12.0

# install dependencies
RUN apk add --no-cache zeromq-dev
Expand All @@ -15,8 +34,6 @@ RUN zig build test -Doptimize=ReleaseFast --summary all

RUN touch /var/touched # dummy build output



# empty result image
FROM scratch

Expand Down

0 comments on commit 4708ba5

Please sign in to comment.