Skip to content

Commit 8e2bac8

Browse files
committed
[DOP-30579] Improve worker image caching
1 parent 80bc7c9 commit 8e2bac8

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docker/Dockerfile.worker

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ ENV PYTHONPATH=/app \
1414
POETRY_VIRTUALENVS_IN_PROJECT=1 \
1515
POETRY_VIRTUALENVS_CREATE=1
1616

17-
COPY ./docker/entrypoint_worker.sh /app/entrypoint.sh
18-
RUN chmod +x /app/entrypoint.sh
19-
ENTRYPOINT ["/app/entrypoint.sh"]
20-
2117

2218
FROM base AS builder
2319

@@ -76,6 +72,11 @@ COPY --from=maven_packages --chown=syncmaster:syncmaster /root/.ivy2/ /home/sync
7672

7773
COPY ./syncmaster/ /app/syncmaster/
7874
RUN python -m compileall syncmaster
75+
76+
COPY ./docker/entrypoint_worker.sh /app/entrypoint.sh
77+
RUN chmod +x /app/entrypoint.sh
78+
ENTRYPOINT ["/app/entrypoint.sh"]
79+
7980
USER syncmaster
8081

8182

@@ -93,8 +94,11 @@ RUN --mount=type=cache,target=/root/.cache/pypoetry \
9394

9495
ENV SYNCMASTER__WORKER__CREATE_SPARK_SESSION_FUNCTION=tests.spark.get_worker_spark_session
9596

97+
COPY ./docker/entrypoint_worker.sh /app/entryp
98+
ENTRYPOINT ["/app/entrypoint.sh"]
9699
# Collect coverage from worker
97-
RUN sed -i 's/python -m/coverage run -m/g' /app/entrypoint.sh
100+
RUN sed -i 's/python -m/coverage run -m/g' /app/entrypoint.shoint.sh
101+
RUN chmod +x /app/entrypoint.sh
98102

99103
# Replace kinit binary with dummy, to skip Kerberos interaction in tests
100104
RUN mkdir -p /app/.local/bin && \

0 commit comments

Comments
 (0)