Skip to content

Commit 910afaf

Browse files
authored
Use absolute pip path while building builder image (kadalu#641)
Ref: kadalu#633, kadalu#639 * also resolved an issue of `--load` and `--push` not to be used together in a docker job. Signed-off-by: Leela Venkaiah G <[email protected]>
1 parent 4b94caa commit 910afaf

File tree

5 files changed

+5
-10
lines changed

5 files changed

+5
-10
lines changed

.github/workflows/on-pr-merge.yml

-5
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ jobs:
7474
platforms: linux/amd64
7575
target: prod
7676
push: true
77-
load: true
7877
tags: |
7978
docker.io/kadalu/kadalu-csi:${{ github.sha }}
8079
docker.io/kadalu/kadalu-csi:devel
@@ -93,7 +92,6 @@ jobs:
9392
platforms: linux/amd64
9493
target: prod
9594
push: true
96-
load: true
9795
tags: |
9896
docker.io/kadalu/kadalu-operator:${{ github.sha }}
9997
docker.io/kadalu/kadalu-operator:devel
@@ -112,7 +110,6 @@ jobs:
112110
platforms: linux/amd64
113111
target: prod
114112
push: true
115-
load: true
116113
tags: |
117114
docker.io/kadalu/kadalu-server:${{ github.sha }}
118115
docker.io/kadalu/kadalu-server:devel
@@ -145,7 +142,6 @@ jobs:
145142
platforms: linux/amd64
146143
target: prod
147144
push: true
148-
load: true
149145
tags: |
150146
docker.io/kadalu/test-io:${{ github.sha }}
151147
docker.io/kadalu/test-io:devel
@@ -165,7 +161,6 @@ jobs:
165161
platforms: linux/amd64
166162
target: prod
167163
push: true
168-
load: true
169164
tags: |
170165
docker.io/kadalu/test-csi:${{ github.sha }}
171166
docker.io/kadalu/test-csi:devel

csi/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENV PATH="/kadalu/bin:/opt/bin:/opt/sbin:$PATH"
66

77
COPY csi-requirements.txt /tmp/
88

9-
RUN python3 -m pip install -r /tmp/csi-requirements.txt && \
9+
RUN python3 -m pip install -r /tmp/csi-requirements.txt --no-cache-dir && \
1010
grep -Po '^[\w\.-]*(?=)' /tmp/csi-requirements.txt | xargs -I pkg python3 -m pip show pkg | grep -P '^(Name|Version|Location)'
1111

1212
FROM python:3.9.6-slim-bullseye as prod

extras/Dockerfile.builder

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ RUN apt-get update -yq && \
1818
chmod +x /usr/bin/kubectl
1919
2020
COPY builder-requirements.txt /tmp/
21-
RUN python3 -m venv $VIRTUAL_ENV && cd $VIRTUAL_ENV && \
22-
python3 -m pip install -r /tmp/builder-requirements.txt && \
21+
RUN python3 -m venv $VIRTUAL_ENV && cd $VIRTUAL_ENV && sleep 1 && which python3 && which pip && \
22+
$VIRTUAL_ENV/bin/pip install -r /tmp/builder-requirements.txt --no-cache-dir && \
2323
grep -Po '^[\w\.-]*(?=)' /tmp/builder-requirements.txt | xargs -I pkg python3 -m pip show pkg | grep -P '^(Name|Version|Location)'
2424
2525
RUN sed -i "s/include-system-site-packages = false/include-system-site-packages = true/g" /kadalu/pyvenv.cfg

operator/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENV PATH="/kadalu/bin:/opt/bin:/opt/sbin:$PATH"
66

77
COPY operator-requirements.txt /tmp/
88

9-
RUN python3 -m pip install -r /tmp/operator-requirements.txt && \
9+
RUN python3 -m pip install -r /tmp/operator-requirements.txt --no-cache-dir && \
1010
grep -Po '^[\w\.-]*(?=)' /tmp/operator-requirements.txt | xargs -I pkg python3 -m pip show pkg | grep -P '^(Name|Version|Location)'
1111

1212
FROM python:3.9.6-slim-bullseye as prod

server/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENV PATH="/kadalu/bin:/opt/bin:/opt/sbin:$PATH"
66

77
COPY server-requirements.txt /tmp/
88

9-
RUN python3 -m pip install -r /tmp/server-requirements.txt && \
9+
RUN python3 -m pip install -r /tmp/server-requirements.txt --no-cache-dir && \
1010
grep -Po '^[\w\.-]*(?=)' /tmp/server-requirements.txt | xargs -I pkg python3 -m pip show pkg | grep -P '^(Name|Version|Location)'
1111

1212
FROM python:3.9.6-slim-bullseye as prod

0 commit comments

Comments
 (0)