」 feat: dockerfile working

This commit is contained in:
2025-05-06 16:21:11 +02:00
parent 401a1bc1f4
commit 4faa03f070

View File

@ -1,4 +1,4 @@
FROM alpine:3.21
FROM alpine:3.21 AS builder
COPY ./ /build
@ -10,14 +10,18 @@ RUN apk add --no-cache bash clang make
RUN cd /build \
&& PKGS=true make -j re
COPY /build/webserv /bin/webserv
FROM alpine:3.21
RUN apk add --no-cache libstdc++
COPY --from=builder /build/webserv /bin/webserv
RUN chmod +x /bin/webserv
WORKDIR /
RUN webserv --generate
RUN /bin/webserv --generate
STOPSIGNAL SIGINT
RUN [ "webserv", "/sample.toml"]
CMD [ "webserv", "/sample.toml"]