Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
FROM golang:1.9.4-alpine3.7 AS builder
FROM golang:1.16.2 AS builder
WORKDIR /go/src/github.com/gliderlabs/registrator/
COPY . .
RUN \
apk add --no-cache curl git \
&& curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh \
&& dep ensure -vendor-only \
&& CGO_ENABLED=0 GOOS=linux go build \
CGO_ENABLED=0 GOOS=linux go build \
-a -installsuffix cgo \
-ldflags "-X main.Version=$(cat VERSION)" \
-o bin/registrator \
.

FROM alpine:3.7
FROM alpine:3.13
RUN apk add --no-cache ca-certificates
COPY --from=builder /go/src/github.com/gliderlabs/registrator/bin/registrator /bin/registrator

Expand Down
11 changes: 2 additions & 9 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
FROM alpine:3.7
FROM golang:1.16.2
CMD ["/bin/registrator"]

COPY . /go/src/github.com/gliderlabs/registrator
RUN apk --no-cache add -t build-deps build-base go git curl \
&& apk --no-cache add ca-certificates \
&& export GOPATH=/go && mkdir -p /go/bin && export PATH=$PATH:/go/bin \
&& curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh \
&& cd /go/src/github.com/gliderlabs/registrator \
&& export GOPATH=/go \
&& git config --global http.https://gopkg.in.followRedirects true \
&& dep ensure \
RUN cd /go/src/github.com/gliderlabs/registrator \
&& go build -ldflags "-X main.Version=dev" -o /bin/registrator
316 changes: 0 additions & 316 deletions Gopkg.lock

This file was deleted.

Loading