This is an automated email from the ASF dual-hosted git repository.
amyrvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new e0cd0d4 [BEAM-9261] Add LICENSE and NOTICE to Docker images
new d976ddc Merge pull request #10788 from alanmyrvold/addLicenseToDocker
e0cd0d4 is described below
commit e0cd0d43e33c869c60d5811a482a2f95c316c1d9
Author: Alan Myrvold <[email protected]>
AuthorDate: Thu Feb 6 09:16:10 2020 -0800
[BEAM-9261] Add LICENSE and NOTICE to Docker images
---
.../src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy | 7 +++++++
runners/flink/job-server-container/Dockerfile | 3 +++
runners/spark/job-server/container/Dockerfile | 4 ++++
sdks/go/container/Dockerfile | 3 +++
sdks/java/container/Dockerfile | 3 +++
sdks/python/container/Dockerfile | 3 +++
6 files changed, 23 insertions(+)
diff --git
a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
index 170c86b..68f2f9c 100644
--- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
@@ -31,6 +31,7 @@ import org.gradle.api.artifacts.ProjectDependency
import org.gradle.api.file.FileTree
import org.gradle.api.plugins.quality.Checkstyle
import org.gradle.api.publish.maven.MavenPublication
+import org.gradle.api.tasks.Copy
import org.gradle.api.tasks.Exec
import org.gradle.api.tasks.JavaExec
import org.gradle.api.tasks.bundling.Jar
@@ -1390,6 +1391,12 @@ class BeamModulePlugin implements Plugin<Project> {
project.ext.applyDockerNature = {
project.apply plugin: "com.palantir.docker"
project.docker { noCache true }
+ project.tasks.create(name: "copyLicenses", type: Copy) {
+ from "${project.rootProject.projectDir}/LICENSE"
+ from "${project.rootProject.projectDir}/NOTICE"
+ into "build/target"
+ }
+ project.tasks.dockerPrepare.dependsOn project.tasks.copyLicenses
}
/**
***********************************************************************************************/
diff --git a/runners/flink/job-server-container/Dockerfile
b/runners/flink/job-server-container/Dockerfile
index 0381131..c5a81ec 100644
--- a/runners/flink/job-server-container/Dockerfile
+++ b/runners/flink/job-server-container/Dockerfile
@@ -24,5 +24,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get
install -y libltdl7
ADD beam-runners-flink-job-server.jar /opt/apache/beam/jars/
ADD flink-job-server.sh /opt/apache/beam/
+COPY target/LICENSE /opt/apache/beam/
+COPY target/NOTICE /opt/apache/beam/
+
WORKDIR /opt/apache/beam
ENTRYPOINT ["./flink-job-server.sh"]
diff --git a/runners/spark/job-server/container/Dockerfile
b/runners/spark/job-server/container/Dockerfile
index 11a5f0e..ec4a123 100644
--- a/runners/spark/job-server/container/Dockerfile
+++ b/runners/spark/job-server/container/Dockerfile
@@ -25,4 +25,8 @@ ADD beam-runners-spark-job-server.jar /opt/apache/beam/jars/
ADD spark-job-server.sh /opt/apache/beam/
WORKDIR /opt/apache/beam
+
+COPY target/LICENSE /opt/apache/beam/
+COPY target/NOTICE /opt/apache/beam/
+
ENTRYPOINT ["./spark-job-server.sh"]
diff --git a/sdks/go/container/Dockerfile b/sdks/go/container/Dockerfile
index 8fb9764..52c6eae 100644
--- a/sdks/go/container/Dockerfile
+++ b/sdks/go/container/Dockerfile
@@ -27,4 +27,7 @@ RUN apt-get update && \
ADD target/linux_amd64/boot /opt/apache/beam/
+COPY target/LICENSE /opt/apache/beam/
+COPY target/NOTICE /opt/apache/beam/
+
ENTRYPOINT ["/opt/apache/beam/boot"]
diff --git a/sdks/java/container/Dockerfile b/sdks/java/container/Dockerfile
index af5c31e..ba8b1a8 100644
--- a/sdks/java/container/Dockerfile
+++ b/sdks/java/container/Dockerfile
@@ -30,4 +30,7 @@ ADD target/kafka-clients.jar /opt/apache/beam/jars/
ADD target/linux_amd64/boot /opt/apache/beam/
+COPY target/LICENSE /opt/apache/beam/
+COPY target/NOTICE /opt/apache/beam/
+
ENTRYPOINT ["/opt/apache/beam/boot"]
diff --git a/sdks/python/container/Dockerfile b/sdks/python/container/Dockerfile
index 4e6b62c..a10cd72 100644
--- a/sdks/python/container/Dockerfile
+++ b/sdks/python/container/Dockerfile
@@ -60,4 +60,7 @@ RUN pip freeze --all
ADD target/launcher/linux_amd64/boot /opt/apache/beam/
+COPY target/LICENSE /opt/apache/beam/
+COPY target/NOTICE /opt/apache/beam/
+
ENTRYPOINT ["/opt/apache/beam/boot"]