2017-09-26 12:50:09 +00:00
|
|
|
FROM golang:alpine AS build
|
2018-12-19 06:49:15 +00:00
|
|
|
RUN apk add git
|
|
|
|
WORKDIR /go/src/swirl/
|
2017-09-26 12:50:09 +00:00
|
|
|
ADD . .
|
2018-11-06 07:56:22 +00:00
|
|
|
ENV GO111MODULE on
|
2018-01-26 05:10:38 +00:00
|
|
|
RUN CGO_ENABLED=0 go build -ldflags "-s -w"
|
2017-09-26 12:50:09 +00:00
|
|
|
|
2018-09-11 08:36:54 +00:00
|
|
|
FROM alpine:3.8
|
2018-04-16 10:49:33 +00:00
|
|
|
LABEL maintainer="cuigh <noname@live.com>"
|
2017-09-26 12:50:09 +00:00
|
|
|
WORKDIR /app
|
2018-06-25 11:03:18 +00:00
|
|
|
RUN apk add --no-cache ca-certificates
|
2018-12-19 06:49:15 +00:00
|
|
|
COPY --from=build /go/src/swirl/swirl .
|
|
|
|
COPY --from=build /go/src/swirl/config ./config/
|
|
|
|
COPY --from=build /go/src/swirl/assets ./assets/
|
|
|
|
COPY --from=build /go/src/swirl/views ./views/
|
2017-09-26 12:50:09 +00:00
|
|
|
EXPOSE 8001
|
|
|
|
ENTRYPOINT ["/app/swirl"]
|