Skip to content

Commit

Permalink
chore: add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvc committed Jul 16, 2023
1 parent fa88b29 commit 659d38d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git
*.md
Dockerfile
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM golang:1.20-alpine AS build
WORKDIR /app
COPY go.* .
RUN go mod download && go mod verify
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go install -a -installsuffix cgo -ldflags '-extldflags "-static"' ./...

FROM scratch
COPY --from=build /go/bin/* /bin/
ENTRYPOINT ["/bin/tpl"]

0 comments on commit 659d38d

Please sign in to comment.