2022-04-28 00:52:28 +00:00
|
|
|
FROM node:lts-alpine AS frontend-builder
|
2022-04-28 00:48:21 +00:00
|
|
|
|
2022-04-28 00:50:50 +00:00
|
|
|
ADD . .
|
2022-04-28 00:48:21 +00:00
|
|
|
RUN cd frontend && npm install && npm run build
|
|
|
|
|
|
|
|
FROM golang:alpine AS builder
|
|
|
|
|
2022-04-28 00:52:28 +00:00
|
|
|
ADD . /app
|
|
|
|
COPY --from=frontend-builder frontend/dist /app/frontend/dist
|
2022-04-28 00:48:21 +00:00
|
|
|
|
2022-04-28 00:54:14 +00:00
|
|
|
RUN apk --no-cache add git
|
2022-04-28 00:52:28 +00:00
|
|
|
RUN cd /app && go build -o minify
|
2022-04-28 00:48:21 +00:00
|
|
|
|
|
|
|
FROM alpine
|
|
|
|
|
2022-04-28 00:56:00 +00:00
|
|
|
COPY --from=builder /app/minify /usr/bin/minify
|
2022-04-28 00:48:21 +00:00
|
|
|
|
|
|
|
CMD ["/usr/bin/minify"]
|