-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (30 loc) · 1.54 KB
/
Dockerfile
File metadata and controls
38 lines (30 loc) · 1.54 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
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
# This Dockerfile builds the OpenTelemetry Protocol with Apache Arrow
# Collector from the code in this repository. It builds using the
# "otelarrowcol" configuration. See collector/otelarrowcol-build.yaml
# for the components that are included in the build, which are all of
# those with sources in this repository plus a few commonly useful
# accessories (e.g., the profiler extension).
FROM golang:1.26@sha256:b54cbf583d390341599d7bcbc062425c081105cc5ef6d170ced98ef9d047c716 AS sandbox
WORKDIR /otel-arrow
COPY . .
ENV CGO_ENABLED=0
# Note the version should match the builder version referenced in the Makefile.
# The version is overridden when running `make builder`.
RUN go install go.opentelemetry.io/collector/cmd/builder@v0.149.0
# This command generates main.go, go.mod but does not update deps.
RUN builder --skip-compilation --skip-get-modules --config=collector/otelarrowcol-build.yaml
# Build from within the collector module directory where go.mod exists.
WORKDIR /otel-arrow/collector/cmd/otelarrowcol
RUN go mod tidy && go build -o /otel-arrow/otelarrowcol .
# This build uses an Alpine Linux container.
FROM alpine@sha256:5b10f432ef3da1b8d4c7eb6c487f2f5a8f096bc91145e68878dd4a5019afde11 AS release
COPY --from=sandbox /otel-arrow/otelarrowcol /
# Network ports
# 4317 - OpenTelemetry gRPC services:
# - OpenTelemetry Protocol with Apache Arrow
# - OpenTelemetry Protocol (OTLP)
# 1777 - Profiling support
EXPOSE 4317/tcp 1777/tcp
ENTRYPOINT ["/otelarrowcol"]