You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by gy...@apache.org on 2022/02/16 10:34:02 UTC

[flink-kubernetes-operator] 09/23: Docker build improvements

This is an automated email from the ASF dual-hosted git repository.

gyfora pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git

commit 5c6c128dcb58323e1a73c0eb188a8099e7d97d48
Author: Jaganathan Asokan <ja...@apple.com>
AuthorDate: Wed Feb 2 15:06:18 2022 -0500

    Docker build improvements
---
 Dockerfile | 12 +++++++++++-
 pom.xml    |  2 +-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index b4da7d8..c834e97 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,9 +15,19 @@
 #  See the License for the specific language governing permissions and
 # limitations under the License.
 ################################################################################
+# Build
+FROM maven:3.8.4-openjdk-11 AS build
+WORKDIR /app
 
+COPY src ./src
+COPY tools ./tools
+COPY pom.xml .
+
+RUN mvn -f ./pom.xml clean install
+
+# stage
 FROM openjdk:11-jre
 
-COPY target/flink-operator-1.0-SNAPSHOT.jar /
+COPY --from=build /app/target/flink-operator-1.0-SNAPSHOT.jar /
 
 CMD ["java", "-jar", "/flink-operator-1.0-SNAPSHOT.jar"]
diff --git a/pom.xml b/pom.xml
index a174ef8..5b3caa3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -282,7 +282,7 @@ under the License.
       						<exclude>**/target/**</exclude>
       						<exclude>apache-maven-3.2.5/**</exclude>
       						<!-- PyCharm -->
-      						<exclude>**/.idea/**</exclude>
+      						<exclude>**/.idea/**</exclude>      
       					</excludes>
       				</configuration>
       			</plugin>