humiditycalc/Dockerfile

12 lines
299 B
Docker
Raw Normal View History

2024-11-02 18:11:56 +00:00
FROM golang:1.22.2
WORKDIR /usr/src/app
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod ./
RUN go mod download && go mod verify
COPY . .
RUN go build -v -o /usr/local/bin/humiditycalc ./...
CMD ["humiditycalc"]