Skip to content

Commit e7f8bd5

Browse files
authored
Merge pull request #6 from SalesLoft/dockerfile-support
added dockerfile and build instructions
2 parents d1d7354 + 1f2ed22 commit e7f8bd5

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

.dockerignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ignore everything
2+
**
3+
4+
# include src content
5+
!go.mod
6+
!go.sum
7+
!*.go
8+
!cmd

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44

55
Every release, along with the migration instructions, is documented on the Github [Releases page](https://github.com/SalesLoft/gorollout/releases).
66

7+
### v1.1.2
8+
9+
Added Dockerfile
10+
11+
### v1.1.1
12+
13+
Security updates and updated golang to v1.18
14+
715
### v1.1.0
816

917
Added support for controlling the randomizing percentage between feature flags. Setting to false will ensure that features are active for the same teams when rolled out the same percentage.

Dockerfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
ARG go_version=1.18
2+
FROM golang:${go_version}-alpine as build
3+
4+
WORKDIR /src
5+
6+
# install dependencies
7+
ARG GOPROXY=https://proxy.golang.org
8+
COPY go.mod go.sum ./
9+
RUN go mod download
10+
11+
COPY feature.go manager.go ./
12+
COPY cmd ./cmd
13+
14+
RUN CGO_ENABLED=0 go build -o /rollout ./cmd/rollout/main.go
15+
16+
FROM scratch
17+
18+
COPY --from=build /rollout /rollout
19+
CMD [ "/rollout" ]

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,8 @@ func main() {
5757
## Command Line Interface (CLI)
5858

5959
gorollout also includes a [command line interface](cmd/rollout/README.md) for viewing and managing feature flags.
60+
61+
## Building and pushing the Docker image
62+
63+
docker buildx create --use
64+
docker buildx build --platform linux/amd64,linux/arm64/v8 -t salesloft/gorollout:v1.1.2 . --push

0 commit comments

Comments
 (0)