Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove uv cache from docker image #158

Merged
merged 2 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/datahub-actions-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ jobs:
"APP_ENV=prod-slim"
- name: Save Docker image
if: needs.setup.outputs.publish != 'true'
run: docker image save -o image.tar ${{ steps.docker_meta_slim.outputs.tags }}
# Replace new line characters with spaces in
# steps.docker_meta_slim.outputs.tags as the new lines splits the
# command into two otherwise.
run: docker image save -o image.tar $(echo "${{ steps.docker_meta_slim.outputs.tags }}" | tr '\n' ' ')
- name: Upload artifact
if: needs.setup.outputs.publish != 'true'
uses: actions/upload-artifact@v4
Expand Down
3 changes: 2 additions & 1 deletion docker/datahub-actions/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@

FROM base AS prod-install

RUN UV_LINK_MODE=copy uv pip install -e ".[all]"
RUN --mount=type=cache,target=/datahub-ingestion/.cache/uv,uid=1000,gid=1000 \
UV_LINK_MODE=copy uv pip install -e ".[all]"

FROM ${APP_ENV}-install AS final
WORKDIR /datahub-ingestion
Expand All @@ -55,4 +56,4 @@
RUN find . -name "htrace-core4-4.1.0-incubating.jar" -exec rm "{}" \;

ENTRYPOINT [ ]
CMD dockerize -wait ${DATAHUB_GMS_PROTOCOL:-http}://$DATAHUB_GMS_HOST:$DATAHUB_GMS_PORT/health -timeout 240s /start_datahub_actions.sh

Check warning on line 59 in docker/datahub-actions/Dockerfile

View workflow job for this annotation

GitHub Actions / Build & Push Image to DockerHub (slim)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
Loading