Skip to content

Commit

Permalink
Merge pull request #6 from SalesLoft/dockerfile-support
Browse files Browse the repository at this point in the history
added dockerfile and build instructions
  • Loading branch information
cmoad authored Jun 8, 2022
2 parents d1d7354 + 1f2ed22 commit e7f8bd5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).

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

### v1.1.2

Added Dockerfile

### v1.1.1

Security updates and updated golang to v1.18

### v1.1.0

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.
Expand Down
19 changes: 19 additions & 0 deletions Dockerfile
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" ]
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,8 @@ func main() {
## Command Line Interface (CLI)

gorollout also includes a [command line interface](cmd/rollout/README.md) for viewing and managing feature flags.

## Building and pushing the Docker image

docker buildx create --use
docker buildx build --platform linux/amd64,linux/arm64/v8 -t salesloft/gorollout:v1.1.2 . --push

0 comments on commit e7f8bd5

Please sign in to comment.