2021-10-21 20:20:27 -05:00
|
|
|
FROM node:14 as uilayer
|
2020-11-01 07:34:37 -08:00
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
COPY ./portal-ui/package.json ./
|
|
|
|
|
COPY ./portal-ui/yarn.lock ./
|
|
|
|
|
RUN yarn install
|
|
|
|
|
|
|
|
|
|
COPY ./portal-ui .
|
|
|
|
|
|
2021-11-04 13:31:55 -07:00
|
|
|
RUN make build-static
|
2020-11-01 07:34:37 -08:00
|
|
|
|
|
|
|
|
USER node
|
|
|
|
|
|
2021-03-05 10:39:17 -08:00
|
|
|
FROM golang:1.16 as golayer
|
2020-04-06 11:27:43 -07:00
|
|
|
|
2020-07-01 11:58:35 -07:00
|
|
|
RUN apt-get update -y && apt-get install -y ca-certificates
|
|
|
|
|
|
2020-07-26 00:34:17 -07:00
|
|
|
ADD go.mod /go/src/github.com/minio/console/go.mod
|
|
|
|
|
ADD go.sum /go/src/github.com/minio/console/go.sum
|
|
|
|
|
WORKDIR /go/src/github.com/minio/console/
|
2020-06-04 13:15:56 -07:00
|
|
|
|
2020-04-06 11:27:43 -07:00
|
|
|
# Get dependencies - will also be cached if we won't change mod/sum
|
|
|
|
|
RUN go mod download
|
|
|
|
|
|
2020-07-26 00:34:17 -07:00
|
|
|
ADD . /go/src/github.com/minio/console/
|
|
|
|
|
WORKDIR /go/src/github.com/minio/console/
|
2020-04-06 11:27:43 -07:00
|
|
|
|
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
|
|
2021-05-14 15:04:29 -07:00
|
|
|
COPY --from=uilayer /app/build /go/src/github.com/minio/console/portal-ui/build
|
2020-07-26 00:34:17 -07:00
|
|
|
RUN go build -ldflags "-w -s" -a -o console ./cmd/console
|
2020-04-06 11:27:43 -07:00
|
|
|
|
2021-06-23 01:10:54 -05:00
|
|
|
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
|
2020-04-06 11:27:43 -07:00
|
|
|
MAINTAINER MinIO Development "dev@min.io"
|
|
|
|
|
EXPOSE 9090
|
|
|
|
|
|
2021-05-14 15:04:29 -07:00
|
|
|
|
2020-11-01 07:34:37 -08:00
|
|
|
COPY --from=golayer /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
|
|
|
COPY --from=golayer /go/src/github.com/minio/console/console .
|
2020-04-06 11:27:43 -07:00
|
|
|
|
2020-07-27 17:18:46 -07:00
|
|
|
ENTRYPOINT ["/console"]
|