swirl/Dockerfile

17 lines
539 B
Docker
Raw Normal View History

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
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
2017-09-26 12:50:09 +00:00
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"]