🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(docker): attribute images to Langfuse and ship the UBI EULA (#19258)
Tobias Wochingerb5e42002c96f
diff --git a/.github/image-labels/ai-gateway.txt b/.github/image-labels/ai-gateway.txtnew file mode 100644index 0000000000..adb69009b2--- /dev/null+++ b/.github/image-labels/ai-gateway.txt@@ -0,0 +1,8 @@+name=langfuse/ai-gateway+summary=Langfuse AI Gateway+description=Langfuse AI Gateway: proxies LLM provider APIs and ingests their generations into Langfuse.+io.k8s.display-name=Langfuse AI Gateway+io.k8s.description=Langfuse AI Gateway: proxies LLM provider APIs and ingests their generations into Langfuse.+org.opencontainers.image.title=ai-gateway+org.opencontainers.image.description=Langfuse AI Gateway: proxies LLM provider APIs and ingests their generations into Langfuse.+org.opencontainers.image.licenses=MITdiff --git a/.github/image-labels/common.txt b/.github/image-labels/common.txtnew file mode 100644index 0000000000..879cfbe2f6--- /dev/null+++ b/.github/image-labels/common.txt@@ -0,0 +1,28 @@+# Labels for every released image, loaded by the release job in+# .github/workflows/pipeline.yml together with <component>.txt. They override+# the labels inherited from the UBI / Iron Bank base. Inherited labels cannot be+# removed, so the Red Hat and Iron Bank ones that would describe the image as+# theirs are set empty; com.redhat.license_terms stays as the EULA pointer.+# The OCI version, created and revision labels come from docker/metadata-action.+vendor=ClickHouse, Inc.+maintainer=ClickHouse, Inc.+url=https://langfuse.com+org.opencontainers.image.vendor=ClickHouse, Inc.+org.opencontainers.image.url=https://langfuse.com+org.opencontainers.image.source=https://github.com/langfuse/langfuse+version=+release=+build-date=+vcs-ref=+vcs-type=+cpe=+com.redhat.component=+distribution-scope=+io.buildah.version=+io.openshift.expose-services=+mil.dso.ironbank.image.keywords=+mil.dso.ironbank.image.parent=+mil.dso.ironbank.image.type=+mil.dso.ironbank.os-type=+mil.dso.ironbank.product.name=+mil.dso.ironbank.project.id=diff --git a/.github/image-labels/web.txt b/.github/image-labels/web.txtnew file mode 100644index 0000000000..a951746674--- /dev/null+++ b/.github/image-labels/web.txt@@ -0,0 +1,8 @@+name=langfuse/langfuse+summary=Langfuse web+description=Langfuse web application: UI, public API and tRPC backend.+io.k8s.display-name=Langfuse Web+io.k8s.description=Langfuse web application: UI, public API and tRPC backend.+org.opencontainers.image.title=langfuse+org.opencontainers.image.description=Langfuse web application: UI, public API and tRPC backend.+org.opencontainers.image.licenses=MIT AND LicenseRef-Langfuse-EEdiff --git a/.github/image-labels/worker.txt b/.github/image-labels/worker.txtnew file mode 100644index 0000000000..1b4f45c0ed--- /dev/null+++ b/.github/image-labels/worker.txt@@ -0,0 +1,8 @@+name=langfuse/langfuse-worker+summary=Langfuse worker+description=Langfuse background worker: ingestion and queue processing.+io.k8s.display-name=Langfuse Worker+io.k8s.description=Langfuse background worker: ingestion and queue processing.+org.opencontainers.image.title=langfuse-worker+org.opencontainers.image.description=Langfuse background worker: ingestion and queue processing.+org.opencontainers.image.licenses=MIT AND LicenseRef-Langfuse-EEdiff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.ymlindex eb48d3c0c9..fa702d1b4a 100644--- a/.github/workflows/pipeline.yml+++ b/.github/workflows/pipeline.yml@@ -1959,6 +1959,18 @@ jobs:with:cache-key: langfuse/${{ matrix.image_name }}-${{ matrix.platform_tag }}nofallback: "true"+ - name: Load image labels+ id: image-labels+ env:+ COMPONENT: ${{ matrix.component }}+ MICRO_BASE_IMAGE: ${{ steps.bases.outputs.micro }}+ run: |+ {+ echo "labels<<IMAGE_LABELS_EOF"+ cat .github/image-labels/common.txt ".github/image-labels/${COMPONENT}.txt"+ echo "org.opencontainers.image.base.name=${MICRO_BASE_IMAGE}"+ echo "IMAGE_LABELS_EOF"+ } >> "$GITHUB_OUTPUT"- name: Extract metadata (labels) for Dockerid: metauses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0@@ -1976,6 +1988,9 @@ jobs:type=semver,pattern={{major}}.{{minor}},enable=${{ !contains(github.ref, '-rc') }}type=semver,pattern={{major}},enable=${{ !contains(github.ref, '-rc') }}type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v4') && !contains(github.ref, '-rc') }}+ # Custom labels replace the action's repository-derived ones, which+ # would title every image "langfuse" with license "NOASSERTION".+ labels: ${{ steps.image-labels.outputs.labels }}- name: Build and push image by digest to GitHub Container Registry (${{ matrix.component }}, ${{ matrix.platform_tag }})id: build-ghcruses: useblacksmith/build-push-action@fb9e3e6a9299c78462bfadd0d93352c316adc9b8 # v2.2.0diff --git a/ai-gateway/Dockerfile b/ai-gateway/Dockerfileindex b904cbe648..511d4c298d 100644--- a/ai-gateway/Dockerfile+++ b/ai-gateway/Dockerfile@@ -122,6 +122,14 @@ RUN dnf -y --installroot /mnt/rootfs --releasever 9 --setopt=install_weak_deps=0RUN echo "gateway:x:10001:" >> /mnt/rootfs/etc/group && \echo "gateway:x:10001:10001::/home/gateway:/sbin/nologin" >> /mnt/rootfs/etc/passwd+# The UBI EULA requires every image derived from UBI to include it unmodified.+# The magic-byte check rejects an HTML error page served in its place.+# Keep in sync with web/Dockerfile and worker/Dockerfile.+RUN mkdir -p /mnt/rootfs/usr/share/licenses/redhat-ubi && \+ curl -fsSL --retry 5 --retry-all-errors -o /mnt/rootfs/usr/share/licenses/redhat-ubi/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf \+ https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf && \+ head -c 5 /mnt/rootfs/usr/share/licenses/redhat-ubi/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf | grep -qx '%PDF-'+FROM --platform=${TARGETPLATFORM:-linux/amd64} ${MICRO_BASE_IMAGE} AS runtimeCOPY --from=rpm-installer /mnt/rootfs /diff --git a/web/Dockerfile b/web/Dockerfileindex 80b5c0559a..b4d0decd7e 100644--- a/web/Dockerfile+++ b/web/Dockerfile@@ -90,6 +90,14 @@ RUN set -eux; \echo "${di_sha256} /mnt/rootfs/usr/bin/dumb-init" | sha256sum -c -; \chmod 0755 /mnt/rootfs/usr/bin/dumb-init+# The UBI EULA requires every image derived from UBI to include it unmodified.+# The magic-byte check rejects an HTML error page served in its place.+# Keep in sync with worker/Dockerfile and ai-gateway/Dockerfile.+RUN mkdir -p /mnt/rootfs/usr/share/licenses/redhat-ubi && \+ curl -fsSL --retry 5 --retry-all-errors -o /mnt/rootfs/usr/share/licenses/redhat-ubi/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf \+ https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf && \+ head -c 5 /mnt/rootfs/usr/share/licenses/redhat-ubi/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf | grep -qx '%PDF-'+# Bake the non-root user into the rootfs (micro has no shadow-utils).RUN echo "nodejs:x:${GID}:" >> /mnt/rootfs/etc/group && \echo "nextjs:x:${UID}:${GID}::/home/nextjs:/sbin/nologin" >> /mnt/rootfs/etc/passwddiff --git a/worker/Dockerfile b/worker/Dockerfileindex 0c5fb96127..302604e7ac 100644--- a/worker/Dockerfile+++ b/worker/Dockerfile@@ -90,6 +90,14 @@ RUN set -eux; \echo "${di_sha256} /mnt/rootfs/usr/bin/dumb-init" | sha256sum -c -; \chmod 0755 /mnt/rootfs/usr/bin/dumb-init+# The UBI EULA requires every image derived from UBI to include it unmodified.+# The magic-byte check rejects an HTML error page served in its place.+# Keep in sync with web/Dockerfile and ai-gateway/Dockerfile.+RUN mkdir -p /mnt/rootfs/usr/share/licenses/redhat-ubi && \+ curl -fsSL --retry 5 --retry-all-errors -o /mnt/rootfs/usr/share/licenses/redhat-ubi/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf \+ https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf && \+ head -c 5 /mnt/rootfs/usr/share/licenses/redhat-ubi/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf | grep -qx '%PDF-'+# Bake the non-root user into the rootfs (micro has no shadow-utils).RUN echo "expressjs:x:${GID}:" >> /mnt/rootfs/etc/group && \echo "expressjs:x:${UID}:${GID}::/home/expressjs:/sbin/nologin" >> /mnt/rootfs/etc/passwd