diff --git a/Dockerfile_ubi b/Dockerfile_ubi new file mode 100644 index 0000000000..b95cdb8277 --- /dev/null +++ b/Dockerfile_ubi @@ -0,0 +1,34 @@ +ARG BUILD_TAG + +## Use original image to copy files from +FROM public.ecr.aws/sumologic/sumologic-otel-collector:${BUILD_TAG} as builder + +## Build RedHat compliant image +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9 + +ENV SUMMARY="UBI based sumologic-otel-collector" \ + DESCRIPTION="Sumo Logic Distribution for OpenTelemetry Collector is a Sumo Logic-supported distribution of the OpenTelemetry Collector. It is a single agent to send logs, metrics and traces to Sumo Logic." + +LABEL name="sumologic-otel-collector" \ + vendor="Sumo Logic" \ + version="$BUILD_TAG" \ + release="4" \ + summary="$SUMMARY" \ + description="$DESCRIPTION" \ + io.k8s.description="$DESCRIPTION" \ + maintainer="collection@sumologic.com" + +ADD https://raw.githubusercontent.com/SumoLogic/sumologic-otel-collector/v${BUILD_TAG}/LICENSE \ + /licenses/LICENSE + +ARG USER_UID=10001 +USER ${USER_UID} +ENV HOME /etc/otel/ + +# copy journalctl and it's dependencies as base structure +COPY --from=builder / / +COPY --from=builder --chown=${USER_UID}:${USER_UID} /etc/otel/ /etc/otel/ +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --from=builder /otelcol-sumo /otelcol-sumo +ENTRYPOINT ["/otelcol-sumo"] +CMD ["--config", "/etc/otel/config.yaml"]