-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from SalesLoft/dockerfile-support
added dockerfile and build instructions
- Loading branch information
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# ignore everything | ||
** | ||
|
||
# include src content | ||
!go.mod | ||
!go.sum | ||
!*.go | ||
!cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
ARG go_version=1.18 | ||
FROM golang:${go_version}-alpine as build | ||
|
||
WORKDIR /src | ||
|
||
# install dependencies | ||
ARG GOPROXY=https://proxy.golang.org | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
COPY feature.go manager.go ./ | ||
COPY cmd ./cmd | ||
|
||
RUN CGO_ENABLED=0 go build -o /rollout ./cmd/rollout/main.go | ||
|
||
FROM scratch | ||
|
||
COPY --from=build /rollout /rollout | ||
CMD [ "/rollout" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters