1
0
mirror of synced 2025-04-19 00:24:02 +03:00
cpp-httplib/Dockerfile
2024-08-31 17:09:20 -04:00

13 lines
332 B
Docker

FROM ubuntu AS builder
WORKDIR /build
COPY httplib.h .
COPY docker/main.cc .
RUN apt update && apt install g++ -y
RUN g++ -std=c++23 -static -o server -O2 -I. -DCPPHTTPLIB_USE_POLL main.cc && strip server
FROM scratch
COPY --from=builder /build/server /server
COPY docker/html/index.html /html/index.html
EXPOSE 80
CMD ["/server"]