1
0
Fork 0
editiCollaborativo/Dockerfile
2019-06-13 13:29:15 +03:00

21 lines
442 B
Docker

FROM golang:1.12 AS compiler
WORKDIR $GOPATH/src/github.com/msoedov/hacker-slides
ENV GO111MODULE on
COPY . .
RUN GOOS=linux CGO_ENABLE=0 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o app *.go
RUN cp app /bin/app
FROM alpine:3.8
WORKDIR /srv
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