Dockerfile
1 FROM golang:latest 2 USER root 3 4 WORKDIR /economy 5 6 # pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change 7 COPY go.mod go.sum ./ 8 RUN go mod download && go mod verify 9 10 COPY . . 11 12 # create and give permissions to use ../data/ledger file 13 RUN mkdir /economy/data 14 15 RUN go build . 16 CMD ["./Economy"]