Skip to content

Commit

Permalink
chore: add docker file (#9)
Browse files Browse the repository at this point in the history
#### What type of PR is this?
/kind chore

#### What this PR does / why we need it:
add docker file of project
  • Loading branch information
panshuai111 authored Apr 11, 2023
1 parent 7fdcba0 commit daa1744
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM golang:1.19 as builder

WORKDIR /workspace
COPY go.mod go.mod
COPY go.sum go.sum
RUN go mod download

COPY cmd/ cmd/
COPY pkg/ pkg/

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o karbour cmd/main.go

FROM alpine:3.17.3

WORKDIR /
COPY --from=builder /workspace/karbour .

ENTRYPOINT ["/karbour"]

0 comments on commit daa1744

Please sign in to comment.