summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..30aceae
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,22 @@
1# ================= BUILD STAGE =================
2FROM alpine:3.19 AS builder
3WORKDIR /project
4
5# Instalacja gcc/make (tylko build stage)
6RUN apk add --no-cache gcc g++ make build-base bash
7
8COPY . .
9
10# Budowa statycznego hostowego binarza
11RUN make clean && \
12 CC="gcc" CFLAGS="-Wall -Wextra -Werror -std=c18 -Iinclude -Ibenchmark -static" make host
13
14# ================= FINAL STAGE =================
15FROM scratch
16WORKDIR /project
17
18# Skopiuj statyczny binarz
19COPY --from=builder /project/build/syntax_essentials_tests_host /syntax_essentials_tests_host
20
21# ENTRYPOINT
22ENTRYPOINT ["/syntax_essentials_tests_host"]