This is an automated email from the ASF dual-hosted git repository.
wangyang0918 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git
The following commit(s) were added to refs/heads/main by this push:
new db13018 [FLINK-27834] Copy all files except those filtered by
.dockerignore
db13018 is described below
commit db13018975361e3271e26be64a3940a5710097e7
Author: tison <[email protected]>
AuthorDate: Mon May 30 22:10:32 2022 +0800
[FLINK-27834] Copy all files except those filtered by .dockerignore
This closes #248.
---
.dockerignore | 23 +++++++++++++++++++++++
Dockerfile | 19 +------------------
2 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..5013ecf
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,23 @@
+# Compiled class file
+**/*.class
+
+# Log file
+**/*.log
+
+# Package Files
+**/*.jar
+**/*.war
+**/*.nar
+**/*.ear
+**/*.zip
+**/*.tar.gz
+**/*.rar
+
+### Maven template
+**/target/
+**/dependency-reduced-pom.xml
+**/.mvn/timing.properties
+
+**/.idea
+**/*.iml
+**/*.DS_Store
diff --git a/Dockerfile b/Dockerfile
index 3efa771..e15ab4c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -20,25 +20,8 @@ FROM maven:3.8.4-openjdk-11 AS build
ARG SKIP_TESTS=true
WORKDIR /app
-ENV SHADED_DIR=flink-kubernetes-shaded
-ENV OPERATOR_DIR=flink-kubernetes-operator
-ENV WEBHOOK_DIR=flink-kubernetes-webhook
-ENV DOCS_DIR=flink-kubernetes-docs
-RUN mkdir $OPERATOR_DIR $WEBHOOK_DIR
-
-COPY pom.xml .
-COPY $SHADED_DIR/pom.xml ./$SHADED_DIR/
-COPY $WEBHOOK_DIR/pom.xml ./$WEBHOOK_DIR/
-COPY $OPERATOR_DIR/pom.xml ./$OPERATOR_DIR/
-COPY $DOCS_DIR/pom.xml ./$DOCS_DIR/
-
-COPY $OPERATOR_DIR/src ./$OPERATOR_DIR/src
-COPY $WEBHOOK_DIR/src ./$WEBHOOK_DIR/src
-
-# Copy the .git directory when the directory exists.
-COPY *.git ./.git
-COPY tools ./tools
+COPY . .
RUN --mount=type=cache,target=/root/.m2 mvn -ntp clean install -pl
!flink-kubernetes-docs -DskipTests=$SKIP_TESTS