Add docker related files

This commit is contained in:
yhirose
2024-08-27 00:23:31 -04:00
parent 048edec9ed
commit 52a18c78a5
3 changed files with 71 additions and 0 deletions

11
Dockerfile Normal file
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"]