forked from johanneswuerbach/jaeger-s3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (20 loc) · 848 Bytes
/
Dockerfile
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
26
27
28
FROM golang:1.20.4 AS base
FROM base AS code
ARG GOARCH=amd64
WORKDIR /src
ADD . .
FROM code AS build
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \
GOOS=linux GOARCH=${GOARCH} CGO_ENABLED=0 go build -o s3-plugin -v -ldflags '-extldflags "-static"'
FROM code AS test
FROM base AS jaeger-grpc-integration
ARG GOARCH=amd64
RUN git clone --depth=1 --single-branch --branch=v1.32.0 https://github.com/jaegertracing/jaeger.git /jaeger
WORKDIR /jaeger
COPY --from=build /src/s3-plugin /go/bin
FROM jaegertracing/all-in-one:1.45.0 AS jaeger-test
COPY --from=build /src/s3-plugin /go/bin
FROM alpine:3.18.0
COPY --from=build /src/s3-plugin /jaeger-s3
# The /plugin is used by the jaeger-operator https://github.com/jaegertracing/jaeger-operator/pull/1517
CMD ["cp", "/jaeger-s3", "/plugin/jaeger-s3"]