2020-10-28 12:00:58 -04:00
|
|
|
FROM golang:alpine AS binarybuilder
|
|
|
|
RUN apk --no-cache --no-progress add \
|
2020-10-28 23:20:32 -04:00
|
|
|
gcc git musl-dev
|
2020-10-28 12:00:58 -04:00
|
|
|
WORKDIR /dashboard
|
|
|
|
COPY . .
|
2021-01-15 11:45:49 -05:00
|
|
|
RUN cd cmd/dashboard && go build -o app -ldflags="-s -w"
|
2020-10-28 12:14:31 -04:00
|
|
|
|
2020-10-28 12:00:58 -04:00
|
|
|
FROM alpine:latest
|
|
|
|
RUN apk --no-cache --no-progress add \
|
|
|
|
ca-certificates \
|
|
|
|
tzdata
|
|
|
|
WORKDIR /dashboard
|
2020-10-28 12:14:31 -04:00
|
|
|
COPY ./resource ./resource
|
2020-10-28 12:00:58 -04:00
|
|
|
COPY --from=binarybuilder /dashboard/cmd/dashboard/app ./app
|
|
|
|
|
|
|
|
VOLUME ["/dashboard/data"]
|
2020-11-06 08:00:42 -05:00
|
|
|
EXPOSE 80 5555
|
2020-11-06 07:51:23 -05:00
|
|
|
CMD ["/dashboard/app"]
|