File size: 609 Bytes
283dbbd 08c3a34 283dbbd 08c3a34 283dbbd 08c3a34 d1c38af 283dbbd d1c38af 9faee16 d1c38af 283dbbd d1c38af 283dbbd 9faee16 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# Use the official Alpine image as the base for a smaller footprint
FROM alpine:latest
# Install curl to download Zig, then install Zig and clean up
RUN apk add --no-cache curl && \
curl -L https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz | tar -Jxf - && \
mv zig-linux-x86_64-0.14.0 /zig && \
ln -s /zig/zig /usr/local/bin/zig && \
apk del curl
# Set working directory
WORKDIR /app
# Copy the Zig source files
COPY . .
# Build the Zig application
RUN zig build
# Expose port 3000
EXPOSE 3000
# Run the application, binding to 0.0.0.0:3000
CMD ["./zig-out/bin/newmine"] |