Update calicoctl Utility Container Image
Update calicoctl Utility Container Image so that it uses non vulnerable packages. Change-Id: I752f9c7c1f7da9ab64a6b79754f0cf16e9eb46e9
This commit is contained in:
parent
942c19243b
commit
4c72a13fc0
@ -23,21 +23,22 @@ RUN set -xe \
|
|||||||
&& echo "nobody:x:65534:65534:nobody:/nonexistent:/bin/bash" >> /etc/passwd \
|
&& echo "nobody:x:65534:65534:nobody:/nonexistent:/bin/bash" >> /etc/passwd \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
bash \
|
bash \
|
||||||
locales \
|
locales \
|
||||||
moreutils \
|
moreutils \
|
||||||
sudo \
|
sudo \
|
||||||
python3 \
|
socat \
|
||||||
python3-pip \
|
python3.6 \
|
||||||
python3-oslo.rootwrap \
|
python3-pip \
|
||||||
socat \
|
&& pip3 install \
|
||||||
|
oslo.rootwrap==5.8.0 \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN sed -i "/rootwrap_logger.setLevel/s/.*/#&/" /usr/lib/python3/dist-packages/oslo_rootwrap/wrapper.py \
|
RUN sed -i "/rootwrap_logger.setLevel/s/.*/#&/" /usr/local/lib/python3.6/dist-packages/oslo_rootwrap/wrapper.py \
|
||||||
&& sed -i "/handler.setFormatter/s/.*/#&/" /usr/lib/python3/dist-packages/oslo_rootwrap/wrapper.py \
|
&& sed -i "/handler.setFormatter/s/.*/#&/" /usr/local/lib/python3.6/dist-packages/oslo_rootwrap/wrapper.py \
|
||||||
&& sed -i "/os.path.basename/s/.*/#&/" /usr/lib/python3/dist-packages/oslo_rootwrap/wrapper.py \
|
&& sed -i "/os.path.basename/s/.*/#&/" /usr/local/lib/python3.6/dist-packages/oslo_rootwrap/wrapper.py \
|
||||||
&& sed -i "/rootwrap_logger.addHandler/s/.*/#&/" /usr/lib/python3/dist-packages/oslo_rootwrap/wrapper.py
|
&& sed -i "/rootwrap_logger.addHandler/s/.*/#&/" /usr/local/lib/python3.6/dist-packages/oslo_rootwrap/wrapper.py
|
||||||
|
|
||||||
COPY --from=stage_calicoctl /calicoctl /usr/local/bin/calicoctl
|
COPY --from=stage_calicoctl /calicoctl /usr/local/bin/calicoctl
|
||||||
|
|
||||||
|
@ -29,21 +29,22 @@ RUN set -xe \
|
|||||||
&& echo "nobody:x:65534:65534:nobody:/nonexistent:/bin/bash" >> /etc/passwd \
|
&& echo "nobody:x:65534:65534:nobody:/nonexistent:/bin/bash" >> /etc/passwd \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
bash \
|
bash \
|
||||||
locales \
|
locales \
|
||||||
moreutils \
|
moreutils \
|
||||||
sudo \
|
sudo \
|
||||||
python3 \
|
socat \
|
||||||
python3-pip \
|
python3.6 \
|
||||||
python3-oslo.rootwrap \
|
python3-pip \
|
||||||
socat \
|
&& pip3 install \
|
||||||
|
oslo.rootwrap==5.8.0 \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN sed -i "/rootwrap_logger.setLevel/s/.*/#&/" /usr/lib/python3/dist-packages/oslo_rootwrap/wrapper.py \
|
RUN sed -i "/rootwrap_logger.setLevel/s/.*/#&/" /usr/local/lib/python3.6/dist-packages/oslo_rootwrap/wrapper.py \
|
||||||
&& sed -i "/handler.setFormatter/s/.*/#&/" /usr/lib/python3/dist-packages/oslo_rootwrap/wrapper.py \
|
&& sed -i "/handler.setFormatter/s/.*/#&/" /usr/local/lib/python3.6/dist-packages/oslo_rootwrap/wrapper.py \
|
||||||
&& sed -i "/os.path.basename/s/.*/#&/" /usr/lib/python3/dist-packages/oslo_rootwrap/wrapper.py \
|
&& sed -i "/os.path.basename/s/.*/#&/" /usr/local/lib/python3.6/dist-packages/oslo_rootwrap/wrapper.py \
|
||||||
&& sed -i "/rootwrap_logger.addHandler/s/.*/#&/" /usr/lib/python3/dist-packages/oslo_rootwrap/wrapper.py
|
&& sed -i "/rootwrap_logger.addHandler/s/.*/#&/" /usr/local/lib/python3.6/dist-packages/oslo_rootwrap/wrapper.py
|
||||||
|
|
||||||
COPY --from=stage_calicoctl /calicoctl /usr/local/bin/calicoctl
|
COPY --from=stage_calicoctl /calicoctl /usr/local/bin/calicoctl
|
||||||
COPY --from=stage_calicoq /calicoq /usr/local/bin/calicoq
|
COPY --from=stage_calicoq /calicoq /usr/local/bin/calicoq
|
||||||
|
Loading…
x
Reference in New Issue
Block a user