Update Postgresql Utility Container Image

Update Postgresql Utility Container Image so that it uses non vulnerable
packages.

Change-Id: I44b112f4741af7960dcc54c35615e1b55d25f22e
This commit is contained in:
KAVVA, JAGAN MOHAN REDDY (jk330k) 2020-05-18 08:23:14 -05:00 committed by Rahul Khiyani
parent a132777b7b
commit 79381cfa03
2 changed files with 15 additions and 18 deletions

View File

@ -15,13 +15,3 @@ limitations under the License.
set -ex
sed -i 's/$PrivDropToUser syslog/$PrivDropToUser nobody/' /etc/rsyslog.conf
/etc/init.d/rsyslog start
{{/*
These lines will disable extra handler, extra formatter, extra level to the
root logger by oslo-rootwrap module, imported in _openstack-utility-rootwrap.tpl.
These lines will get rid of duplicate logs, generated because of the formatter
attached by oslo-rootwrap.
*/}}
sed -i "/rootwrap_logger.setLevel/s/.*/#&/" /usr/lib/python3/dist-packages/oslo_rootwrap/wrapper.py
sed -i "/handler.setFormatter/s/.*/#&/" /usr/lib/python3/dist-packages/oslo_rootwrap/wrapper.py
sed -i "/os.path.basename/s/.*/#&/" /usr/lib/python3/dist-packages/oslo_rootwrap/wrapper.py
sed -i "/rootwrap_logger.addHandler/s/.*/#&/" /usr/lib/python3/dist-packages/oslo_rootwrap/wrapper.py

View File

@ -1,4 +1,4 @@
ARG FROM=ubuntu:18.04
ARG FROM=docker.io/ubuntu:bionic
FROM ${FROM}
LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc://#airshipit@freenode' \
@ -17,16 +17,23 @@ RUN set -xe && \
apt-transport-https ca-certificates gnupg \
bash \
moreutils \
postgresql-client \
postgresql-common \
python3-pip \
python3-oslo.rootwrap \
python3-openstackclient \
python3-swiftclient \
rsyslog \
screen \
sudo && \
sudo \
postgresql-client \
postgresql-common \
python3.6 \
python3-pip && \
pip3 install \
oslo.rootwrap==5.8.0 \
openstackclient \
python-swiftclient && \
apt-get clean -y && \
rm -rf /var/cache/debconf/* /var/lib/apt/lists/*
RUN sed -i "/rootwrap_logger.setLevel/s/.*/#&/" /usr/local/lib/python3.6/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/local/lib/python3.6/dist-packages/oslo_rootwrap/wrapper.py \
&& sed -i "/rootwrap_logger.addHandler/s/.*/#&/" /usr/local/lib/python3.6/dist-packages/oslo_rootwrap/wrapper.py
CMD ["/bin/bash"]