Dockerfile with make
This commit is contained in:
parent
ef25f1db1b
commit
c0b7407185
20
Dockerfile
20
Dockerfile
@ -1,23 +1,23 @@
|
||||
FROM node as jsbuild
|
||||
|
||||
ADD s3browser-frontend /s3browser-frontend
|
||||
WORKDIR /s3browser-frontend
|
||||
ADD . /s3browser
|
||||
WORKDIR /s3browser
|
||||
|
||||
RUN yarn install
|
||||
RUN yarn run build
|
||||
RUN make build-web
|
||||
|
||||
FROM golang as gobuild
|
||||
|
||||
ADD s3browser-backend /s3browser-backend
|
||||
ADD . /s3browser
|
||||
WORKDIR /s3browser
|
||||
|
||||
WORKDIR /s3browser-backend
|
||||
COPY --from=jsbuild /s3browser/s3browser-frontend/build /s3browser/s3browser-backend/internal/static
|
||||
|
||||
COPY --from=jsbuild /s3browser-frontend/build /s3browser-backend/internal/static
|
||||
|
||||
RUN go build -o s3browser -tags prod ./cmd/s3Browser.go
|
||||
RUN make build-backend
|
||||
|
||||
FROM gcr.io/distroless/base-debian10
|
||||
|
||||
COPY --from=gobuild /s3browser-backend/s3browser /
|
||||
COPY --from=gobuild /s3browser/s3browser /
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD [ "/s3browser" ]
|
Loading…
Reference in New Issue
Block a user