diff --git a/Dockerfile b/Dockerfile index 0791db7..48f9dff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,15 @@ -FROM golang:1.25-bookworm AS build +# syntax=docker/dockerfile:1 + +FROM --platform=$BUILDPLATFORM golang:1.25-bookworm AS build + +ARG TARGETOS +ARG TARGETARCH WORKDIR /src COPY . . RUN --mount=type=cache,target=/go/pkg/mod \ --mount=type=cache,target=/root/.cache/go-build \ + GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 \ go run go.opentelemetry.io/collector/cmd/builder@v0.153.0 --config builder-config.yaml FROM gcr.io/distroless/base-debian12:nonroot diff --git a/builder-config.yaml b/builder-config.yaml index 60e5f0d..2efe691 100644 --- a/builder-config.yaml +++ b/builder-config.yaml @@ -3,7 +3,7 @@ dist: name: querycommentcol description: QueryComment database OpenTelemetry Collector output_path: ./dist - version: 0.1.1 + version: 0.1.2 extensions: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.153.0 diff --git a/config/mysql.yaml b/config/mysql.yaml index 84a6dc8..84c83a9 100644 --- a/config/mysql.yaml +++ b/config/mysql.yaml @@ -50,7 +50,7 @@ processors: resource/database: attributes: - key: qc_agent_version - value: ${env:QC_AGENT_VERSION:-0.1.1} + value: ${env:QC_AGENT_VERSION:-0.1.2} action: insert - key: db.system value: mysql diff --git a/config/postgresql.yaml b/config/postgresql.yaml index b57f0b3..630e59b 100644 --- a/config/postgresql.yaml +++ b/config/postgresql.yaml @@ -51,7 +51,7 @@ processors: resource/database: attributes: - key: qc_agent_version - value: ${env:QC_AGENT_VERSION:-0.1.1} + value: ${env:QC_AGENT_VERSION:-0.1.2} action: insert - key: db.system value: postgresql diff --git a/config/sqlserver.yaml b/config/sqlserver.yaml index 7e90c95..ee8a15c 100644 --- a/config/sqlserver.yaml +++ b/config/sqlserver.yaml @@ -44,7 +44,7 @@ processors: resource/database: attributes: - key: qc_agent_version - value: ${env:QC_AGENT_VERSION:-0.1.1} + value: ${env:QC_AGENT_VERSION:-0.1.2} action: insert - key: db.system value: ${env:QC_DB_SYSTEM:-sqlserver}