Speed up container builds
Turns out upgrading pip enables grpcio PyPi package to use wheels to install binaries, avioding need to compile it every time. This saves a ton of time when building containers. Change-Id: I6e4a5f9fddd24b8e88c62b444e8b305ade3f7f2a
This commit is contained in:
parent
cecd86b282
commit
6d459143f6
|
@ -18,7 +18,8 @@ RUN yum upgrade -y \
|
||||||
|
|
||||||
COPY . /opt/kuryr-kubernetes
|
COPY . /opt/kuryr-kubernetes
|
||||||
|
|
||||||
RUN pip3 install -c $UPPER_CONSTRAINTS_FILE /opt/kuryr-kubernetes \
|
RUN pip3 install -U pip \
|
||||||
|
&& python3 -m pip install -c $UPPER_CONSTRAINTS_FILE /opt/kuryr-kubernetes \
|
||||||
&& cp /opt/kuryr-kubernetes/cni_ds_init /usr/bin/cni_ds_init \
|
&& cp /opt/kuryr-kubernetes/cni_ds_init /usr/bin/cni_ds_init \
|
||||||
&& mkdir -p /etc/kuryr-cni \
|
&& mkdir -p /etc/kuryr-cni \
|
||||||
&& cp /opt/kuryr-kubernetes/etc/cni/net.d/* /etc/kuryr-cni \
|
&& cp /opt/kuryr-kubernetes/etc/cni/net.d/* /etc/kuryr-cni \
|
||||||
|
|
|
@ -10,7 +10,8 @@ RUN yum upgrade -y \
|
||||||
|
|
||||||
COPY . /opt/kuryr-kubernetes
|
COPY . /opt/kuryr-kubernetes
|
||||||
|
|
||||||
RUN pip3 install -c $UPPER_CONSTRAINTS_FILE --no-cache-dir /opt/kuryr-kubernetes \
|
RUN pip3 install -U pip \
|
||||||
|
&& python3 -m pip install -c $UPPER_CONSTRAINTS_FILE --no-cache-dir /opt/kuryr-kubernetes \
|
||||||
&& yum -y history undo last \
|
&& yum -y history undo last \
|
||||||
&& yum clean all \
|
&& yum clean all \
|
||||||
&& rm -rf /opt/kuryr-kubernetes \
|
&& rm -rf /opt/kuryr-kubernetes \
|
||||||
|
|
Loading…
Reference in New Issue