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