File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 1515# limitations under the License.
1616#
1717FROM gradle:8.13-jdk17-noble AS builder
18+
1819WORKDIR /app
20+
1921COPY . .
20- RUN ./gradlew clean build -x check
2122
22- FROM azul/zulu-openjdk:21
23+ RUN --mount=type=cache,target=/home/gradle/.gradle/caches gradle --no-daemon clean build -x check
24+
25+ FROM azul/zulu-openjdk:21-jre
26+
2327ARG APP_VERSION=0.1.0-SNAPSHOT
2428ARG SPARK_UID=185
29+
2530LABEL org.opencontainers.image.authors=
"Apache Spark project <[email protected] >" 2631LABEL org.opencontainers.image.licenses="Apache-2.0"
2732LABEL org.opencontainers.image.ref.name="Apache Spark Kubernetes Operator"
@@ -32,14 +37,16 @@ ENV SPARK_OPERATOR_WORK_DIR=/opt/spark-operator/operator
3237ENV SPARK_OPERATOR_JAR=spark-kubernetes-operator.jar
3338
3439WORKDIR $SPARK_OPERATOR_WORK_DIR
40+
3541RUN groupadd --system --gid=$SPARK_UID spark && \
3642 useradd --system --home-dir $SPARK_OPERATOR_HOME --uid=$SPARK_UID --gid=spark spark && \
3743 chown -R spark:spark $SPARK_OPERATOR_HOME
3844
3945COPY --from=builder --chown=spark:spark /app/spark-operator/build/libs/spark-kubernetes-operator-$APP_VERSION-all.jar $SPARK_OPERATOR_JAR
4046COPY --from=builder --chown=spark:spark /app/build-tools/docker/docker-entrypoint.sh .
4147
42-
4348USER spark
49+
4450ENTRYPOINT ["/opt/spark-operator/operator/docker-entrypoint.sh" ]
51+
4552CMD ["help" ]
You can’t perform that action at this time.
0 commit comments