fix docker image build again.

This commit is contained in:
Jason Kulatunga 2023-07-14 20:43:57 -07:00
parent b85cb51b60
commit e897ddc3fa
No known key found for this signature in database
1 changed files with 5 additions and 3 deletions

View File

@ -16,7 +16,8 @@ COPY frontend/package.json frontend/yarn.lock ./
RUN yarn install --frozen-lockfile
COPY frontend/ ./
RUN yarn run build -- --configuration ${FASTEN_ENV} --output-path=../dist
RUN --mount=type=cache,target=/tmp/lock,sharing=locked \
yarn run build -- --configuration ${FASTEN_ENV} --output-path=../dist
#########################################################################################################
# Backend Build
@ -26,12 +27,13 @@ FROM golang:1.18 as backend-build
WORKDIR /go/src/github.com/fastenhealth/fastenhealth-onprem
COPY . .
RUN go mod vendor \
RUN --mount=type=cache,target=/tmp/lock,sharing=locked \
go mod vendor \
&& go install github.com/golang/mock/mockgen@v1.6.0 \
&& go generate ./... \
&& go vet ./... \
&& go test ./... \
RUN CGO_ENABLED=0 go build -o /go/bin/fasten ./backend/cmd/fasten/
&& CGO_ENABLED=0 go build -o /go/bin/fasten ./backend/cmd/fasten/
# create folder structure
RUN mkdir -p /opt/fasten/db \