Skip to content

Commit 57cb7d2

Browse files
togashidmddib
authored andcommitted
Fix Dockerfile python pkg versioning (intel#19)
During the fix for hadolint the docker image build were performed without the flag --no-cache. This resonating in carrying some of successfull layers during the build and bumping the OS version. Therefore, building the image without this fix would occurr in the following error: ERROR: unable to select packages: python3-3.10.5-r0: breaks: world[python3=3.8.10] satisfies: py3-kiwisolver-1.2.0-r3[python3] python3-dev-3.10.5-r0[python3=3.10.5-r0] py3-pip-22.1.1-r0[python3] py3-pep517-0.12.0-r2[python3] py3-contextlib2-21.6.0-r2[python3] py3-setuptools-59.4.0-r0[python3] cython-0.29.24-r1[python3] py3-tz-2022.1-r0[python3] py3-tomli-2.0.1-r1[python3] py3-parsing-2.4.7-r3[python3] py3-packaging-21.3-r0[python3] py3-fs-2.4.16-r0[python3] py3-ordered-set-4.0.2-r3[python3] py3-more-itertools-8.13.0-r0[python3] py3-cycler-0.10.0-r8[python3] py3-certifi-2021.10.8-r0[python3] py3-dateutil-2.8.2-r1[python3] py3-appdirs-1.4.4-r3[python3] py3-retrying-1.3.3-r3[python3] py3-six-1.16.0-r1[python3] py3-matplotlib-3.5.2-r0: breaks: world[py3-matplotlib=3.5.1] py3-pandas-1.3.2-r2: breaks: world[py3-pandas=1.4.3] py3-pip-22.1.1-r0: breaks: world[py3-pip=20.0.2] py3-scipy-1.7.2-r1: breaks: world[py3-scipy=1.9.0] The command '/bin/sh -c apk update && apk --no-cache add python3= "3.8.10" py3-matplotlib="3.5.1" py3-pandas="1.4.3" py3-pip="20.0.2" py3-scipy="1.9.0"' returned a non-zero code: 26
1 parent 23a3190 commit 57cb7d2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ COPY pkg/planner/actuators/platform/analyze.py /app/pkg/planner/actuators/platfo
2626
COPY pkg/planner/actuators/platform/predict.py /app/pkg/planner/actuators/platform/predict.py
2727
COPY pkg/planner/actuators/platform/test_predict.py /app/pkg/planner/actuators/platform/test_predict.py
2828

29-
RUN apk update && apk --no-cache add python3="3.8.10" py3-matplotlib="3.5.1" py3-pandas="1.4.3" py3-pip="20.0.2" py3-scipy="1.9.0"
30-
RUN pip install --no-cache-dir pymongo=="4.2.0"
29+
RUN apk update && apk --no-cache add python3=~3.10.5 py3-matplotlib=~3.5.2 py3-pandas~=1.3.2 \
30+
py3-pip=~22.1.1 py3-scipy=~1.7.2
31+
RUN pip install --no-cache-dir pymongo==4.2.0
3132

3233
USER nonroot:nonroot
3334

0 commit comments

Comments
 (0)