gohttpserver/docker/Dockerfile

15 lines
408 B
Text
Raw Permalink Normal View History

FROM docker.io/golang:1.16 AS build
2020-10-10 09:05:59 +02:00
WORKDIR /app/gohttpserver
ADD . /app/gohttpserver
2018-09-26 10:10:27 +02:00
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-X main.VERSION=docker' -o gohttpserver
2017-12-21 07:22:56 +01:00
FROM docker.io/alpine:latest
2017-12-21 07:22:56 +01:00
RUN mkdir -p /app/public
VOLUME /app/public
WORKDIR /app
2018-09-17 14:34:55 +02:00
ADD assets ./assets
COPY --from=build /app/gohttpserver/gohttpserver .
2017-12-21 07:22:56 +01:00
EXPOSE 8000
2018-09-26 07:52:24 +02:00
ENTRYPOINT [ "/app/gohttpserver", "--root=/app/public" ]
CMD []