remove cache refs
This commit is contained in:
parent
144216e95f
commit
c5b6cad55b
13
Dockerfile
13
Dockerfile
|
@ -10,7 +10,6 @@ WORKDIR /go/src/app
|
||||||
# Set our build environment
|
# Set our build environment
|
||||||
ENV GOPATH=/go
|
ENV GOPATH=/go
|
||||||
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
|
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
|
||||||
ENV GOCACHE=/tmp/.go-build-cache
|
|
||||||
# This variable communicates to the service that it's running inside
|
# This variable communicates to the service that it's running inside
|
||||||
# a docker container.
|
# a docker container.
|
||||||
ENV ENV_DOCKER=true
|
ENV ENV_DOCKER=true
|
||||||
|
@ -18,16 +17,13 @@ ENV ENV_DOCKER=true
|
||||||
# Copy dockerignore files
|
# Copy dockerignore files
|
||||||
COPY .dockerignore ./
|
COPY .dockerignore ./
|
||||||
|
|
||||||
# Install go deps using the cache
|
# Install go deps
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
RUN --mount=type=cache,target=/tmp/.go-build-cache \
|
RUN go mod download -x
|
||||||
go mod download -x
|
|
||||||
|
|
||||||
# Install node deps
|
# Install node deps
|
||||||
COPY frontend/package.json frontend/package-lock.json frontend/
|
COPY frontend/package.json frontend/package-lock.json frontend/
|
||||||
RUN npm config set cache /tmp/.npm-cache --global
|
RUN npm ci --prefix frontend
|
||||||
RUN --mount=type=cache,target=/tmp/.npm-cache \
|
|
||||||
npm ci --prefix frontend
|
|
||||||
|
|
||||||
COPY Makefile ./
|
COPY Makefile ./
|
||||||
|
|
||||||
|
@ -42,8 +38,7 @@ COPY internal internal
|
||||||
COPY docs docs
|
COPY docs docs
|
||||||
|
|
||||||
# Build the backend
|
# Build the backend
|
||||||
RUN --mount=type=cache,target=/tmp/.go-build-cache \
|
RUN make backend VERSION=$VERSION
|
||||||
make backend VERSION=$VERSION
|
|
||||||
|
|
||||||
# Now create a new image with just the binary
|
# Now create a new image with just the binary
|
||||||
FROM gcr.io/distroless/static-debian11:nonroot
|
FROM gcr.io/distroless/static-debian11:nonroot
|
||||||
|
|
Loading…
Reference in New Issue
Block a user