Skip to content

Commit 8ae6c47

Browse files
Install local path in Dockerfile.heartbeat (#93)
1 parent 5cad69a commit 8ae6c47

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/heartbeat/Dockerfile.heartbeat

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
FROM golang:1.18.3-alpine3.16 AS build
33
RUN apk add git
44
ADD . /go/src/github.com/m-lab/locate
5-
RUN go install -v \
5+
WORKDIR /go/src/github.com/m-lab/locate
6+
RUN CGO_ENABLED=0 go install -v \
67
-ldflags "-X github.com/m-lab/go/prometheusx.GitShortCommit=$(git log -1 --format=%h)" \
7-
github.com/m-lab/locate/cmd/heartbeat@latest
8+
./cmd/heartbeat
89

910
# Now copy the resulting command into the minimal base image.
1011
FROM alpine:3.16

0 commit comments

Comments
 (0)