You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dashboard/Dockerfile

32 lines
640 B
Docker

FROM node:16 as frontend-builder
WORKDIR /micro
COPY frontend .
RUN npm install -g @angular/cli && \
npm install && \
npm run build
FROM golang:1.19 as backend-builder
WORKDIR /micro
COPY . .
COPY --from=frontend-builder /micro/dist frontend/dist
RUN go install github.com/swaggo/swag/cmd/swag@latest && \
swag init && \
go install github.com/UnnoTed/fileb0x@latest && \
fileb0x b0x.yaml && \
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o dashboard .
FROM alpine:latest
WORKDIR /usr/local/bin
COPY --from=backend-builder /micro/dashboard .
EXPOSE 80
ENTRYPOINT [ "/usr/local/bin/dashboard" ]