Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add legal info to Docker images #910

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ in the GitHub organization <https://github.com/eclipse-tractusx>:

This project leverages the following third party content.

See DEPENDENCIES file.
- OpenTelemetry Agent v1.32.0: <https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.0>

For additional dependencies, see [DEPENDENCIES](./DEPENDENCIES) file.

## Cryptography

Expand Down
27 changes: 19 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ allprojects {
swagger {
title.set((project.findProperty("apiTitle") ?: "Tractus-X REST API") as String)
description =
(project.findProperty("apiDescription")
?: "Tractus-X REST APIs - merged by OpenApiMerger") as String
(project.findProperty("apiDescription")
?: "Tractus-X REST APIs - merged by OpenApiMerger") as String
outputFilename.set(project.name)
outputDirectory.set(file("${rootProject.projectDir.path}/resources/openapi/yaml"))
resourcePackages = setOf("org.eclipse.tractusx.edc")
Expand Down Expand Up @@ -147,12 +147,12 @@ allprojects {
subprojects {
afterEvaluate {
if (project.plugins.hasPlugin("com.github.johnrengelman.shadow") &&
file("${project.projectDir}/src/main/docker/Dockerfile").exists()
file("${project.projectDir}/src/main/docker/Dockerfile").exists()
) {

val agentFile = project.buildDir.resolve("opentelemetry-javaagent.jar")
// create task to download the opentelemetry agent
val openTelemetryAgentUrl = "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.27.0/opentelemetry-javaagent.jar"
val openTelemetryAgentUrl = "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.32.0/opentelemetry-javaagent.jar"
val downloadOtel = tasks.create("downloadOtel") {
// only execute task if the opentelemetry agent does not exist. invoke the "clean" task to force
onlyIf {
Expand All @@ -166,15 +166,23 @@ subprojects {
doLast {
val download = { url: String, destFile: File ->
ant.invokeMethod(
"get",
mapOf("src" to url, "dest" to destFile)
"get",
mapOf("src" to url, "dest" to destFile)
)
}
logger.lifecycle("Downloading OpenTelemetry Agent")
download(openTelemetryAgentUrl, agentFile)
}
}

// this task copies some legal docs into the build folder, so we can easily copy them into the docker images
val copyLegalDocs = tasks.create("copyLegalDocs", Copy::class) {
from(project.rootProject.projectDir)
into("${project.buildDir}/legal")
include("SECURITY.md", "NOTICE.md", "DEPENDENCIES", "LICENSE")
dependsOn(tasks.named(ShadowJavaPlugin.SHADOW_JAR_TASK_NAME))
}

//actually apply the plugin to the (sub-)project
apply(plugin = "com.bmuschko.docker-remote-api")
// configure the "dockerize" task
Expand All @@ -188,11 +196,14 @@ subprojects {
platform.set(System.getProperty("platform"))
buildArgs.put("JAR", "build/libs/${project.name}.jar")
buildArgs.put("OTEL_JAR", agentFile.relativeTo(dockerContextDir).path)
buildArgs.put("ADDITIONAL_FILES", "build/legal/*")
inputDir.set(file(dockerContextDir))
}
// make sure always runs after "dockerize" and after "copyOtel"
dockerTask.dependsOn(tasks.named(ShadowJavaPlugin.SHADOW_JAR_TASK_NAME))
.dependsOn(downloadOtel)
dockerTask
.dependsOn(tasks.named(ShadowJavaPlugin.SHADOW_JAR_TASK_NAME))
.dependsOn(downloadOtel)
.dependsOn(copyLegalDocs)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Eclipse Tractus-X product(s) installed within the image:
- Additional information about the Eclipse Temurin
images: <https://github.com/docker-library/repo-info/tree/master/repos/eclipse-temurin>

## Third-Party Software

- OpenTelemetry Agent v1.32.0: <https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.0>

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc
from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
FROM eclipse-temurin:17.0.8.1_1-jre-alpine
ARG JAR
ARG OTEL_JAR
ARG ADDITIONAL_FILES

ARG APP_USER=docker
ARG APP_UID=10100
Expand All @@ -41,6 +42,7 @@ WORKDIR /app

COPY ${JAR} edc-controlplane.jar
COPY ${OTEL_JAR} opentelemetry-javaagent.jar
COPY ${ADDITIONAL_FILES} ./

HEALTHCHECK NONE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Eclipse Tractus-X product(s) installed within the image:
- Additional information about the Eclipse Temurin
images: <https://github.com/docker-library/repo-info/tree/master/repos/eclipse-temurin>

## Third-Party Software

- OpenTelemetry Agent v1.32.0: <https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.0>

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc
from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
FROM eclipse-temurin:17.0.8.1_1-jre-alpine
ARG JAR
ARG OTEL_JAR
ARG ADDITIONAL_FILES

ARG APP_USER=docker
ARG APP_UID=10100
Expand All @@ -42,6 +43,7 @@ WORKDIR /app

COPY ${JAR} edc-controlplane.jar
COPY ${OTEL_JAR} opentelemetry-javaagent.jar
COPY ${ADDITIONAL_FILES} ./

HEALTHCHECK NONE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ARG JAR

ARG APP_USER=docker
ARG APP_UID=10100
ARG ADDITIONAL_FILES

RUN addgroup --system "$APP_USER"

Expand All @@ -41,6 +42,7 @@ USER "$APP_USER"
WORKDIR /app

COPY ${JAR} edc-controlplane.jar
COPY ${ADDITIONAL_FILES} ./

HEALTHCHECK NONE

Expand Down
4 changes: 4 additions & 0 deletions edc-dataplane/edc-dataplane-azure-vault/notice.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Eclipse Tractus-X product(s) installed within the image:
- Additional information about the Eclipse Temurin
images: <https://github.com/docker-library/repo-info/tree/master/repos/eclipse-temurin>

## Third-Party Software

- OpenTelemetry Agent v1.32.0: <https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.0>

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc
from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
FROM eclipse-temurin:17.0.8.1_1-jre-alpine
ARG JAR
ARG OTEL_JAR
ARG ADDITIONAL_FILES

ARG APP_USER=docker
ARG APP_UID=10100
Expand All @@ -41,6 +42,7 @@ WORKDIR /app

COPY ${JAR} edc-dataplane.jar
COPY ${OTEL_JAR} opentelemetry-javaagent.jar
COPY ${ADDITIONAL_FILES} ./

HEALTHCHECK NONE

Expand Down
4 changes: 4 additions & 0 deletions edc-dataplane/edc-dataplane-hashicorp-vault/notice.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Eclipse Tractus-X product(s) installed within the image:
- Additional information about the Eclipse Temurin
images: <https://github.com/docker-library/repo-info/tree/master/repos/eclipse-temurin>

## Third-Party Software

- OpenTelemetry Agent v1.32.0: <https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.0>

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc
from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
FROM eclipse-temurin:17.0.8.1_1-jre-alpine
ARG JAR
ARG OTEL_JAR
ARG ADDITIONAL_FILES

ARG APP_USER=docker
ARG APP_UID=10100
Expand All @@ -42,6 +43,7 @@ WORKDIR /app

COPY ${JAR} edc-dataplane.jar
COPY ${OTEL_JAR} opentelemetry-javaagent.jar
COPY ${ADDITIONAL_FILES} ./


HEALTHCHECK NONE
Expand Down
Loading