This commit is contained in:
parent
afea0a04a9
commit
ea723e4a7b
18
Dockerfile
Normal file
18
Dockerfile
Normal file
|
@ -0,0 +1,18 @@
|
|||
FROM golang:1.22.3-alpine as builder
|
||||
|
||||
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 go.sum ./
|
||||
RUN go mod download && go mod verify
|
||||
|
||||
COPY . .
|
||||
RUN go build -v -o konulukonum
|
||||
|
||||
RUN go test -v ./...
|
||||
|
||||
FROM alpine
|
||||
WORKDIR /root/app
|
||||
COPY --from=builder /usr/src/app .
|
||||
|
||||
CMD ["./konulukonum"]
|
Loading…
Reference in New Issue
Block a user