mirror of
https://github.com/LeRoid-hub/humiditycalc.git
synced 2025-01-31 03:34:56 +00:00
fixed Dockerfile
This commit is contained in:
parent
1f2e2bd221
commit
ea3100df68
15
Dockerfile
15
Dockerfile
@ -1,12 +1,15 @@
|
|||||||
FROM golang:1.22.2
|
FROM golang:1.22
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /app
|
||||||
|
|
||||||
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
|
|
||||||
COPY go.mod ./
|
COPY go.mod ./
|
||||||
RUN go mod download && go mod verify
|
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN go build -v -o /usr/local/bin/humiditycalc ./...
|
|
||||||
|
|
||||||
CMD ["humiditycalc"]
|
RUN go build -o /humiditycalc
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
CMD [ "/humiditycalc" ]
|
Loading…
Reference in New Issue
Block a user