Dockerfile 297 B

1234567891011
  1. FROM ubuntu AS builder
  2. WORKDIR /app
  3. COPY httplib.h .
  4. COPY docker/main.cc .
  5. RUN apt update && apt install g++ -y
  6. RUN g++ -std=c++14 -static -o server -O3 -I. -DCPPHTTPLIB_USE_POLL main.cc
  7. FROM scratch
  8. COPY --from=builder /app/server /server
  9. COPY docker/index.html /html/index.html
  10. CMD ["/server"]