darkhttpd/Dockerfile
Miles Elam 35c488b95f
Dockerize (#3)
Add static build option to Makefile and create Dockerfile to run it.
2021-04-03 18:08:52 +11:00

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 ["."]