swirl/Dockerfile
2018-04-16 18:49:33 +08:00

16 lines
500 B
Docker

FROM golang:alpine AS build
WORKDIR /go/src/github.com/cuigh/swirl/
ADD . .
#RUN dep ensure
RUN CGO_ENABLED=0 go build -ldflags "-s -w"
FROM alpine:3.7
LABEL 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"]