File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -6,28 +6,32 @@ RUN useradd -m ziguser
66# Install dependencies (update to latest secure versions)
77RUN apt-get update && \
88 apt-get install -y --no-install-recommends \
9- wget \
9+ wget xz-utils \
1010 ca-certificates && \
1111 apt-get clean && \
1212 rm -rf /var/lib/apt/lists/*
1313
1414# Download the latest stable Zig binary from the official website
1515ARG ZIG_VERSION=0.13.0
16- RUN wget https://ziglang.org/download/0.13.0/zig-linux-aarch64 -0.13.0.tar.xz
16+ RUN wget https://ziglang.org/download/0.13.0/zig-linux-{{arch}} -0.13.0.tar.xz
1717
18- RUN tar -xvf zig-linux-aarch64 -0.13.0.tar.xz
18+ RUN tar -xvf zig-linux-{{arch}} -0.13.0.tar.xz
1919
20- RUN mv zig-linux-aarch64 -0.13.0 /usr/local/zig && \
20+ RUN mv zig-linux-{{arch}} -0.13.0 /usr/local/zig
2121
2222# Add Zig to the PATH
2323ENV PATH="/usr/local/zig:$PATH"
2424
25- # Switch to the non-root user
26- USER ziguser
25+ WORKDIR /home/ziguser
2726
2827{{#files}}
2928COPY '{{source}}' '{{target}}'
29+ RUN chown ziguser {{target}}
3030{{/files}}
31+ RUN chown -R ziguser src
32+
33+ # Switch to the non-root user
34+ USER ziguser
3135
3236RUN zig build -Doptimize=ReleaseFast
3337
You can’t perform that action at this time.
0 commit comments