dataEconomy/Dockerfile

24 lines
449 B
Text
Raw Normal View History

FROM golang:1.12 AS compiler
WORKDIR $GOPATH/src/github.com/msoedov/hacker-slides
ENV GO111MODULE on
2019-06-28 12:23:05 +02:00
RUN go mod download
COPY . .
2019-06-28 12:23:05 +02:00
RUN GOOS=linux CGO_ENABLE=0 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o /bin/app *.go
2019-01-12 18:06:40 +01:00
FROM alpine:3.8
WORKDIR /srv
2017-02-08 02:02:51 +01:00
ENV GIN_MODE=release
RUN mkdir slides
COPY --from=compiler /bin/app /bin/app
COPY static static
COPY templates templates
COPY initial-slides.md initial-slides.md
CMD app $PORT