2
0

Dockerfile 805 B

123456789101112131415161718192021222324252627282930
  1. ######################################################################
  2. # Copyright (c) 2024 Silvio Clecio (silvioprog) <[email protected]>
  3. #
  4. # SPDX-License-Identifier: MIT
  5. ######################################################################
  6. # podman build -t hello_sagui .
  7. # podman run --rm -p 8080:8080 -it hello_sagui
  8. FROM alpine:3.19.1 AS builder
  9. RUN apk add --no-cache \
  10. make \
  11. autoconf \
  12. automake \
  13. clang \
  14. cmake
  15. WORKDIR /app
  16. COPY . /app/
  17. RUN mkdir build && \
  18. cd build/ && \
  19. cmake -DBUILD_SHARED_LIBS=OFF .. && \
  20. make example_httpsrv
  21. RUN strip /app/build/examples/example_httpsrv
  22. FROM scratch
  23. WORKDIR /app
  24. COPY --from=builder /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
  25. COPY --from=builder /app/build/examples/example_httpsrv .
  26. ENTRYPOINT ["./example_httpsrv", "8080"]