Add docker related files

This commit is contained in:
yhirose committed 2024-08-27 00:23:31 -04:00
1 parent 048edec9ed
commit 52a18c78a5
3 files changed
+71

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
FROM ubuntu AS builder
WORKDIR /app
COPY httplib.h .
COPY docker/main.cc .
RUN apt update && apt install g++ -y
RUN g++ -std=c++14 -static -o server -O3 -I. -DCPPHTTPLIB_USE_POLL main.cc
FROM scratch
COPY --from=builder /app/server /server
COPY docker/index.html /html/index.html
CMD ["/server"]