Skip to content

Commit

Permalink
fix zig too
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed Jun 10, 2024
1 parent f32a8f7 commit 8dade18
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion dockerfiles/zig-0.12.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM alpine:3.19
# syntax=docker/dockerfile:1.7-labs
FROM alpine:3.20

# Add the testing repository
RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
Expand All @@ -17,5 +18,15 @@ RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /et
# Update the package list and install Zig
RUN apk add --no-cache zig@community=0.12.0-r0

WORKDIR /app

# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses
COPY --exclude=.git --exclude=README.md . /app

RUN zig build

RUN printf "set -e \ncd \${CODECRAFTERS_SUBMISSION_DIR} \necho 'Running zig build' \nzig build \necho 'zig build completed.' \n" > /codecrafters-precompile.sh
RUN chmod +x /codecrafters-precompile.sh

# Once the heavy steps are done, we can copy all files back
COPY . /app

0 comments on commit 8dade18

Please sign in to comment.