Skip to content

Commit

Permalink
chore: cache gnofaucet
Browse files Browse the repository at this point in the history
  • Loading branch information
albttx committed May 9, 2024
1 parent 4383c92 commit bacd837
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ RUN go env -w GOMODCACHE=/root/.cache/go-build
RUN mkdir -p /opt/gno/src /opt/build
WORKDIR /opt/build
ADD go.mod go.sum .
RUN --mount=type=cache,target=/root/.cache/go-build go mod download
RUN --mount=type=cache,target=/root/.cache/go-build go mod download
ADD . ./
RUN --mount=type=cache,target=/root/.cache/go-build go build -o ./build/gnoland ./gno.land/cmd/gnoland
RUN --mount=type=cache,target=/root/.cache/go-build go build -o ./build/gnokey ./gno.land/cmd/gnokey
RUN --mount=type=cache,target=/root/.cache/go-build go build -o ./build/gnoweb ./gno.land/cmd/gnoweb
RUN --mount=type=cache,target=/root/.cache/go-build go build -o ./build/gno ./gnovm/cmd/gno
RUN --mount=type=cache,target=/root/.cache/go-build go build -o ./build/gnoland ./gno.land/cmd/gnoland
RUN --mount=type=cache,target=/root/.cache/go-build go build -o ./build/gnokey ./gno.land/cmd/gnokey
RUN --mount=type=cache,target=/root/.cache/go-build go build -o ./build/gnoweb ./gno.land/cmd/gnoweb
RUN --mount=type=cache,target=/root/.cache/go-build go build -o ./build/gno ./gnovm/cmd/gno
RUN ls -la ./build
ADD . /opt/gno/src/
RUN rm -rf /opt/gno/src/.git
Expand All @@ -19,9 +19,11 @@ FROM golang:1.22 AS build-faucet
RUN mkdir -p /opt/gno/src /opt/build
WORKDIR /opt/build
ADD contribs/gnofaucet/go.mod contribs/gnofaucet/go.sum .
RUN go mod download
# RUN go mod download
RUN --mount=type=cache,target=/root/.cache/go-build go mod download
ADD contribs/gnofaucet ./
RUN go build -o ./build/gnofaucet .
# RUN go build -o ./build/gnofaucet .
RUN --mount=type=cache,target=/root/.cache/go-build go build -o ./build/gnofaucet .


# runtime-base + runtime-tls
Expand Down

0 comments on commit bacd837

Please sign in to comment.