Files
porthole/images/postgresql-utility/Dockerfile.ubuntu_bionic
Cliff Parsons bfe30402dd Add backup/restore capability to Postgresql utility deployment
This patch adds capability to execute the database backup/restore functions
within the postgresql utility container.

Change-Id: I6a507ee8b2931db0454b70a68ff86ee18e2639f1
2020-06-19 23:16:20 +00:00

48 lines
1.9 KiB
Docker

ARG FROM=docker.io/ubuntu:bionic
FROM ${FROM}
LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc://#airshipit@freenode' \
org.opencontainers.image.url='https://airshipit.org' \
org.opencontainers.image.documentation='https://opendev.org/airship/porthole' \
org.opencontainers.image.source='https://opendev.org/airship/porthole' \
org.opencontainers.image.vendor='The Airship Authors' \
org.opencontainers.image.licenses='Apache-2.0'
ARG KUBE_VERSION=1.17.3
RUN set -xe && \
export DEBIAN_FRONTEND=noninteractive && \
sed -i '/nobody/d' /etc/passwd && \
echo "nobody:x:65534:65534:nobody:/nonexistent:/bin/bash" >> /etc/passwd && \
apt-get update && \
apt-get install -y wget curl \
apt-transport-https ca-certificates gnupg \
bash \
moreutils \
rsyslog \
screen \
sudo \
postgresql-client \
postgresql-common \
python3.6 \
python3-pip && \
pip3 install \
oslo.rootwrap==5.8.0 \
openstackclient \
python-swiftclient && \
apt-get clean -y && \
TMP_DIR=$(mktemp --directory) && \
cd ${TMP_DIR} && \
curl -sSL https://dl.k8s.io/v${KUBE_VERSION}/kubernetes-client-linux-amd64.tar.gz | tar -zxv --strip-components=1 && \
mv ${TMP_DIR}/client/bin/kubectl /usr/bin/kubectl && \
chmod +x /usr/bin/kubectl && \
rm -rf ${TMP_DIR} && \
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"]