2017-09-26 12:50:09 +00:00
|
|
|
FROM golang:alpine AS build
|
|
|
|
WORKDIR /go/src/github.com/cuigh/swirl/
|
|
|
|
ADD . .
|
|
|
|
#RUN dep ensure
|
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-01-26 05:10:38 +00:00
|
|
|
FROM alpine:3.7
|
2017-09-26 12:50:09 +00:00
|
|
|
MAINTAINER cuigh <noname@live.com>
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=build /go/src/github.com/cuigh/swirl/swirl .
|
|
|
|
COPY --from=build /go/src/github.com/cuigh/swirl/config ./config/
|
|
|
|
COPY --from=build /go/src/github.com/cuigh/swirl/assets ./assets/
|
|
|
|
COPY --from=build /go/src/github.com/cuigh/swirl/views ./views/
|
|
|
|
EXPOSE 8001
|
|
|
|
ENTRYPOINT ["/app/swirl"]
|