1) This updates etcd Download links as parameterized. 2) Updated python to 3.6 as recommended by CSO Clair Scan. 3) Removed the dependencies of oslo-rootwrap config in charts so as to reduce dependency failures. Change-Id: Ic3f86f6f07d9ef76b21167a57ded8f86b2ce314b Signed-off-by: diwakar thyagaraj <diwakar.chitoor.thyagaraj@att.com>
50 lines
2.0 KiB
Docker
50 lines
2.0 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 ETCDCTL_VERSION=3.4.2
|
|
|
|
ENV GOOGLE_URL=https://storage.googleapis.com/etcd
|
|
ENV GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
|
|
ENV DOWNLOAD_URL=${GITHUB_URL}
|
|
|
|
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 \
|
|
locales \
|
|
apt-transport-https \
|
|
ca-certificates \
|
|
gnupg \
|
|
bash \
|
|
moreutils \
|
|
sudo \
|
|
rsyslog \
|
|
python3.6 \
|
|
python3-pip \
|
|
&& pip3 install \
|
|
oslo.rootwrap==5.8.0 \
|
|
&& TMP_DIR=$(mktemp --directory) && cd ${TMP_DIR} \
|
|
&& curl -sSLO "${DOWNLOAD_URL}/v${ETCDCTL_VERSION}/etcd-v${ETCDCTL_VERSION}-linux-amd64.tar.gz" \
|
|
&& tar -xvf ${TMP_DIR}/etcd-v${ETCDCTL_VERSION}-linux-amd64.tar.gz --strip-components=1 \
|
|
-C /usr/local/bin etcd-v${ETCDCTL_VERSION}-linux-amd64/etcdctl \
|
|
&& apt-get clean -y \
|
|
&& rm -rf \
|
|
/var/lib/apt/lists/* \
|
|
{TMP_DIR}
|
|
|
|
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"] |