Create Dockerfile

Build a static copy of darkhttpd and bundle in a slim image
This commit is contained in:
Miles Elam 2021-04-02 09:22:43 -07:00 committed by GitHub
parent 9222bbc9d8
commit c297abfb68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
# Build environment
FROM alpine AS build
RUN apk add --no-cache build-base
WORKDIR /src
COPY . .
RUN make darkhttpd-static \
&& strip darkhttpd-static
# Just the static binary
FROM scratch
WORKDIR /www-root
COPY --from=build /src/darkhttpd-static /darkhttpd
ENTRYPOINT ["/darkhttpd"]