Skip to content

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
katsew committed Jun 9, 2019
1 parent 5b14104 commit 12e2922
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/artifacts
/hack
/cmd
/vendor
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM golang:1.12.5-alpine3.9 as builder

ENV GO111MODULE "on"
WORKDIR /builder
RUN apk add --update --no-cache git

COPY go.mod .
COPY go.sum .
RUN go mod download

COPY . .

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build

FROM scratch

COPY --from=builder /builder/spanner-operator /spanner-operator

ENV MOCK_DATA_PATH ""

ENTRYPOINT ["/spanner-operator"]

0 comments on commit 12e2922

Please sign in to comment.