You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
387 B

# syntax=docker/dockerfile:experimental
FROM golang:1.17.3
WORKDIR /data/blotter
# deps cache
COPY ./go.mod ./go.sum /data/blotter/
RUN go mod download -x
RUN go build all
# build code
# build with cache:
COPY ./ /data/blotter
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go generate