File: Dockerfile

package info (click to toggle)
cpp-httplib 0.26.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,732 kB
  • sloc: cpp: 19,414; makefile: 176; sh: 50; python: 50
file content (13 lines) | stat: -rw-r--r-- 372 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
FROM yhirose4dockerhub/ubuntu-builder AS builder
WORKDIR /build
COPY httplib.h .
COPY docker/main.cc .
RUN g++ -std=c++23 -static -o server -O2 -I. main.cc && strip server

FROM scratch
COPY --from=builder /build/server /server
COPY docker/html/index.html /html/index.html
EXPOSE 80

ENTRYPOINT ["/server"]
CMD ["--host", "0.0.0.0", "--port", "80", "--mount", "/:./html"]