Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4ef94c8

Browse files
xuhdevnejch
authored andcommitted
build: Add "--no-cache-dir" to pip commands in Dockerfile
This would not leave cache files in the built docker image.Additionally, also only build the wheel in the build phase.On my machine, before this PR, size is 74845395; after this PR, size is72617713.
1 parentc53e695 commit4ef94c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ FROM python:3.12-${PYTHON_FLAVOR} AS build
33

44
WORKDIR /opt/python-gitlab
55
COPY . .
6-
RUN pip install build && python -m build
6+
RUN pip install--no-cache-dirbuild && python -m build --wheel
77

88
FROM python:3.12-${PYTHON_FLAVOR}
99

1010
LABEL org.opencontainers.image.source="https://github.com/python-gitlab/python-gitlab"
1111

1212
WORKDIR /opt/python-gitlab
1313
COPY --from=build /opt/python-gitlab/dist dist/
14-
RUN pip install PyYaml
15-
RUN pip install $(find dist -name *.whl) && \
14+
RUN pip install--no-cache-dirPyYaml
15+
RUN pip install--no-cache-dir$(find dist -name *.whl) && \
1616
rm -rf dist/
1717

1818
ENTRYPOINT ["gitlab"]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp