Skip to content

Commit

Permalink
added Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
alash3al committed Aug 7, 2024
1 parent c699417 commit ffb8b54
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM golang:1.22-alpine As builder

WORKDIR /vecdb/

RUN apk update && apk add git upx

COPY go.mod go.sum ./

RUN go mod download

COPY . .

RUN CGO_ENABLED=0 go build -ldflags "-s -w" -o /usr/bin/vecdb ./cmd/

RUN upx -9 /usr/bin/vecdb

FROM alpine

WORKDIR /vecdb/

COPY --from=builder /usr/bin/vecdb /usr/bin/vecdb

0 comments on commit ffb8b54

Please sign in to comment.