porthole/Dockerfiles/openstack-utility/Dockerfile.ubuntu_xenial
Dodda Prateek (pd2839) 69d9e6db4c Chart/Dockerfile for Openstack Utility Container
Added Support for rbac

Change-Id: I6644824776f7890c2475904ba3404e281e10e54e
Co-authored-by: Sreejith Punnapuzha <Sreejith.Punnapuzha@outlook.com>
2019-08-20 14:56:51 +00:00

32 lines
2.3 KiB
Docker
Executable File

ARG FROM=docker.io/ubuntu:xenial
FROM ${FROM}
MAINTAINER Prateek Reddy Dodda <pd2839@att.com>
RUN set -xe \
&& echo '#!/bin/sh' > /usr/sbin/policy-rc.d \
## If there is no shebang at the beginning of the file, the OS will try to execute it as a “normal” binary.
&& echo 'exit 101' >> /usr/sbin/policy-rc.d \
&& chmod +x /usr/sbin/policy-rc.d \
## To prevent services from being started automatically when you install packages with dpkg, apt, etc.,
&& sed -i '/nobody/d' /etc/passwd \
&& echo "nobody:x:65534:65534:nobody:/nonexistent:/bin/bash" >> /etc/passwd \
## To Restrict User to nobody for User login.
&& dpkg-divert --local --rename --add /sbin/initctl \
&& cp -a /usr/sbin/policy-rc.d /sbin/initctl \
&& sed -i 's/^exit.*/exit 0/' /sbin/initctl \
## To use an updated version of some application instead of old version existing on your machine.
&& echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/docker-apt-speedup \
## Temporarily disable dpkg fsync to make building faster.
&& echo 'DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' > /etc/apt/apt.conf.d/docker-clean \
&& echo 'APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' >> /etc/apt/apt.conf.d/docker-clean \
&& echo 'Dir::Cache::pkgcache ""; Dir::Cache::srcpkgcache "";' >> /etc/apt/apt.conf.d/docker-clean \
&& echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/docker-no-languages \
&& echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/docker-gzip-indexes \
&& echo 'Apt::AutoRemove::SuggestsImportant "false";' > /etc/apt/apt.conf.d/docker-autoremove-suggests \
# Docker configurations for base Image
&& apt-get update && apt-get install -y bash moreutils vim sudo screen rsyslog x11-apps python-oslo.rootwrap python-openstackclient python-glanceclient python-novaclient python-neutronclient python-cinderclient python-heat python3-oslo.rootwrap python3-openstackclient python3-glanceclient python3-novaclient python3-neutronclient python3-cinderclient \
## Install bash utilities,rsyslog,openstack client which is required for Keystone and oslo rootwrap.
&& apt-get clean && rm -rf /var/lib/apt/lists/*
CMD ["/bin/bash"]