Skip to content

Commit

Permalink
dockerfile allowing to run redli from a container without pre-install…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
Amit Mor committed Aug 30, 2020
1 parent 84041a1 commit ec1fd41
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM golang:1.14-alpine as builder

RUN apk add --no-cache ca-certificates git

WORKDIR /src
COPY go.mod ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a --ldflags '-s -w -extldflags "-static"' -tags netgo -installsuffix netgo -o ./redli


FROM alpine:3.9
RUN apk --no-cache add ca-certificates
COPY --from=builder /src/redli /redli
ENTRYPOINT ["/redli"]

0 comments on commit ec1fd41

Please sign in to comment.