cpp-httplib/Dockerfile

12 lines
321 B
Text
Raw Normal View History

2024-09-03 15:04:58 -07:00
FROM yhirose4dockerhub/ubuntu-builder AS builder
2024-08-31 14:09:20 -07:00
WORKDIR /build
2024-08-26 21:23:31 -07:00
COPY httplib.h .
COPY docker/main.cc .
2024-08-31 14:09:20 -07:00
RUN g++ -std=c++23 -static -o server -O2 -I. -DCPPHTTPLIB_USE_POLL main.cc && strip server
2024-08-26 21:23:31 -07:00
FROM scratch
2024-08-31 14:09:20 -07:00
COPY --from=builder /build/server /server
COPY docker/html/index.html /html/index.html
EXPOSE 80
2024-08-26 21:23:31 -07:00
CMD ["/server"]