mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-04-11 19:28:30 +00:00
Add docker related files
This commit is contained in:
11
Dockerfile
Normal file
11
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user