mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com> Co-authored-by: Dotan Simha <dotansimha@gmail.com> Co-authored-by: Denis Badurina <denis@denelop.com>
34 lines
848 B
Docker
34 lines
848 B
Docker
FROM scratch AS config
|
|
|
|
COPY builder-config.yaml .
|
|
COPY extension-hiveauth/ ./extension-hiveauth/
|
|
|
|
FROM golang:1.23.7-bookworm AS builder
|
|
|
|
ARG OTEL_VERSION=0.122.0
|
|
|
|
WORKDIR /build
|
|
|
|
RUN go install go.opentelemetry.io/collector/cmd/builder@v${OTEL_VERSION}
|
|
|
|
# Copy the manifest file and other necessary files
|
|
COPY --from=config builder-config.yaml .
|
|
COPY --from=config extension-hiveauth/ ./extension-hiveauth/
|
|
|
|
# Build the custom collector
|
|
RUN CGO_ENABLED=0 builder --config=/build/builder-config.yaml
|
|
|
|
# Stage 2: Final Image
|
|
FROM alpine:3.14
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy the generated collector binary from the builder stage
|
|
COPY --from=builder /build/otelcol-custom .
|
|
COPY config.yaml /etc/otel-config.yaml
|
|
|
|
# Expose necessary ports
|
|
EXPOSE 4317/tcp 4318/tcp 13133/tcp
|
|
|
|
# Set the default command
|
|
CMD ["./otelcol-custom", "--config=/etc/otel-config.yaml"]
|