2020-10-10 09:05:59 +02:00
|
|
|
FROM golang:1.13
|
|
|
|
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
|
|
|
|
2018-09-17 14:34:55 +02:00
|
|
|
FROM debian:stretch
|
2017-12-21 07:22:56 +01:00
|
|
|
WORKDIR /app
|
|
|
|
RUN mkdir -p /app/public
|
2018-09-17 15:44:45 +02:00
|
|
|
RUN apt-get update && apt-get install -y ca-certificates
|
2017-12-21 07:22:56 +01:00
|
|
|
VOLUME /app/public
|
2018-09-17 14:34:55 +02:00
|
|
|
ADD assets ./assets
|
2020-10-10 09:05:59 +02:00
|
|
|
COPY --from=0 /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 []
|