mirror of
https://github.com/cuigh/swirl
synced 2024-12-28 14:51:57 +00:00
17 lines
542 B
Docker
17 lines
542 B
Docker
FROM golang:alpine AS build
|
|
WORKDIR /go/src/github.com/cuigh/swirl/
|
|
ADD . .
|
|
ENV GO111MODULE on
|
|
RUN CGO_ENABLED=0 go build -ldflags "-s -w"
|
|
|
|
FROM alpine:3.8
|
|
LABEL maintainer="cuigh <noname@live.com>"
|
|
WORKDIR /app
|
|
RUN apk add --no-cache ca-certificates
|
|
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"]
|