mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
35c488b95f
Add static build option to Makefile and create Dockerfile to run it.
17 lines
313 B
Docker
17 lines
313 B
Docker
# 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 /var/www/htdocs
|
|
COPY --from=build /src/darkhttpd-static /darkhttpd
|
|
EXPOSE 80
|
|
ENTRYPOINT ["/darkhttpd"]
|
|
CMD ["."]
|
|
|