-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.reannotator
More file actions
25 lines (24 loc) · 1.04 KB
/
Dockerfile.reannotator
File metadata and controls
25 lines (24 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM golang:1.20 as build
ENV CGO_ENABLED 0
WORKDIR /go/src/github.com/m-lab/archive-repacker
COPY . .
# Build reannotator and put the git commit hash into the binary.
RUN go get -v ./...
RUN go install \
-ldflags "-X github.com/m-lab/go/prometheusx.GitShortCommit=$(git log -1 --format=%h)$(git diff --quiet || echo dirty)" \
./cmd/reannotator
RUN go install \
-ldflags "-X github.com/m-lab/go/prometheusx.GitShortCommit=$(git log -1 --format=%h)$(git diff --quiet || echo dirty)" \
./cmd/renamer
FROM alpine:3.17
# By default, alpine has no root certs. Add them so pusher can use PKI to
# verify that Google Cloud Storage is actually Google Cloud Storage.
RUN apk add --no-cache ca-certificates
COPY --from=build /go/bin/reannotator /
COPY --from=build /go/bin/renamer /
COPY --from=measurementlab/uuid-annotator:latest /data/asnames.ipinfo.csv /data/asnames.ipinfo.csv
WORKDIR /
# Make sure /reannotator can run (has no missing external dependencies).
RUN /reannotator -h 2> /dev/null
RUN /renamer -h 2> /dev/null
ENTRYPOINT ["/reannotator"]