Skip to content

Commit

Permalink
Update Dockerfile golang to match go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
nsurfer committed Nov 19, 2021
1 parent 8922a09 commit 861edea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docker/bootconfig/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.13-alpine3.10 AS builder
FROM golang:1.16-alpine3.14 AS builder
WORKDIR $GOPATH/src/github.com/nats-io/nats-operator/
RUN apk add --update git
COPY . .
RUN go get ./...
RUN CGO_ENABLED=0 go build -o /nats-pod-bootconfig ./cmd/bootconfig/main.go

FROM alpine:3.8
FROM alpine:3.14
COPY --from=builder /nats-pod-bootconfig /usr/local/bin/nats-pod-bootconfig
CMD ["nats-pod-bootconfig"]
4 changes: 2 additions & 2 deletions docker/operator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.15.6-alpine AS builder
FROM golang:1.16-alpine3.14 AS builder
WORKDIR $GOPATH/src/github.com/nats-io/nats-operator/
RUN apk add --update git
COPY . .
RUN go get ./...
RUN CGO_ENABLED=0 go build -ldflags "-X github.com/nats-io/nats-operator/version.GitSHA=`git rev-parse --short HEAD`" -installsuffix cgo -o /nats-operator ./cmd/operator/main.go

FROM alpine:3.12
FROM alpine:3.14
COPY --from=builder /nats-operator /usr/local/bin/nats-operator
CMD ["nats-operator"]
4 changes: 2 additions & 2 deletions docker/reloader/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.13-alpine3.10 AS builder
FROM golang:1.16-alpine3.14 AS builder
WORKDIR $GOPATH/src/github.com/nats-io/nats-operator/
RUN apk add --update git
COPY . .
RUN go get ./...
RUN CGO_ENABLED=0 go build -ldflags "-X github.com/nats-io/nats-operator/version.GitSHA=`git rev-parse --short HEAD`" -installsuffix cgo -o /nats-server-config-reloader ./cmd/reloader/main.go

FROM alpine:3.8
FROM alpine:3.14
COPY --from=builder /nats-server-config-reloader /usr/local/bin/nats-server-config-reloader
CMD ["nats-server-config-reloader"]

0 comments on commit 861edea

Please sign in to comment.