1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-12-08 00:45:29 +01:00
programming-challenges/templates/docker/c/Dockerfile

10 lines
341 B
Docker
Raw Normal View History

2024-11-18 01:04:51 +01:00
FROM gcc:12.4.0-bookworm AS builder
2022-12-30 00:55:21 +01:00
WORKDIR /usr/src/application
COPY ./ ./
RUN gcc ./*.c* -o solution -Wall -Wextra -Wfloat-equal -Wundef -Werror -std=c17 -pedantic -pedantic-errors -O3
2023-09-16 14:38:47 +02:00
FROM gcr.io/distroless/cc-debian12:latest AS runner
2022-12-30 00:55:21 +01:00
WORKDIR /usr/src/application
COPY --from=builder /usr/src/application/solution ./
CMD ["./solution"]