File tree Expand file tree Collapse file tree 3 files changed +34
-4
lines changed
solutions/zig/01-gg4/code Expand file tree Collapse file tree 3 files changed +34
-4
lines changed Original file line number Diff line number Diff line change @@ -7,5 +7,5 @@ debug: false
77# Use this to change the Zig version used to run your code
88# on Codecrafters.
99#
10- # Available versions: zig-0.15
11- buildpack : zig-0.15
10+ # Available versions: zig-0.15.2
11+ buildpack : zig-0.15.2
Original file line number Diff line number Diff line change 1+ # syntax=docker/dockerfile:1.7-labs
2+ FROM debian:bookworm
3+
4+ RUN apt-get update && \
5+ apt-get install --no-install-recommends -y xz-utils=5.4.1-1 && \
6+ apt-get clean && \
7+ rm -rf /var/lib/apt/lists/*
8+
9+ # Download and install Zig
10+ RUN curl -O https://ziglang.org/download/0.15.2/zig-x86_64-linux-0.15.2.tar.xz \
11+ && tar -xf zig-x86_64-linux-0.15.2.tar.xz \
12+ && mv zig-x86_64-linux-0.15.2 /usr/local/zig \
13+ && rm zig-x86_64-linux-0.15.2.tar.xz
14+
15+ # Add Zig to PATH
16+ ENV PATH="/usr/local/zig:${PATH}"
17+
18+ ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="build.zig,build.zig.zon"
19+
20+ WORKDIR /app
21+
22+ # .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses
23+ COPY --exclude=.git --exclude=README.md . /app
24+
25+ # This runs zig build
26+ RUN .codecrafters/compile.sh
27+
28+ # Cache build directory
29+ RUN mkdir -p /app-cached
30+ RUN mv /app/.zig-cache /app-cached/.zig-cache || true
Original file line number Diff line number Diff line change @@ -7,5 +7,5 @@ debug: false
77# Use this to change the Zig version used to run your code
88# on Codecrafters.
99#
10- # Available versions: zig-0.15
11- buildpack : zig-0.15
10+ # Available versions: zig-0.15.2
11+ buildpack : zig-0.15.2
You can’t perform that action at this time.
0 commit comments