FROM docker.io/alpine:3.23@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659 AS builder WORKDIR /vector COPY vector-*-unknown-linux-musl*.tar.gz ./ RUN tar -xvf vector-0*-"$(cat /etc/apk/arch)"-unknown-linux-musl*.tar.gz --strip-components=2 RUN mkdir -p /var/lib/vector # distroless doesn't use static tags # hadolint ignore=DL3007 FROM gcr.io/distroless/static:latest@sha256:47b2d72ff90843eb8a768b5c2f89b40741843b639d065b9b937b07cd59b479c6 # https://github.com/opencontainers/image-spec/blob/main/annotations.md LABEL org.opencontainers.image.url="https://vector.dev" LABEL org.opencontainers.image.source="https://github.com/vectordotdev/vector" LABEL org.opencontainers.image.documentation="https://vector.dev/docs" COPY --from=builder /vector/bin/* /usr/local/bin/ COPY --from=builder /vector/config/vector.yaml /etc/vector/vector.yaml COPY --from=builder /var/lib/vector /var/lib/vector # Smoke test RUN ["vector", "--version"] ENTRYPOINT ["/usr/local/bin/vector"]