Dockerfile with make

This commit is contained in:
Djeeberjr 2021-09-09 23:33:11 +02:00
parent ef25f1db1b
commit c0b7407185
2 changed files with 12 additions and 12 deletions

View File

@ -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 /
CMD [ "/s3browser" ]
EXPOSE 3000
CMD [ "/s3browser" ]

View File

@ -1,4 +1,4 @@
BINARY_NAME=s3Browser
BINARY_NAME=s3browser
all: build