ranger/Dockerfile
stewie925 1231c83f42 Fix Ranger issues
Fix up Ranger Dockerfile and README.rst.
Fix Dockerfile for tempest tests.
Also remove unnecessary directories.

Change-Id: I6d64755c6911919f8527e94a57113d886daf22bc
2018-08-20 17:14:14 +00:00

61 lines
1.0 KiB
Docker

FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
ENV container docker
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
RUN apt -qq update && \
apt -y install git \
netcat \
netbase \
openssh-server \
python-minimal \
python-setuptools \
python-pip \
python-dev \
python-dateutil \
ca-certificates \
openstack-pkg-tools \
apache2 \
gcc \
g++ \
libffi-dev \
libssl-dev --no-install-recommends \
libmysqlclient-dev \
&& apt-get clean \
&& rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/usr/share/man \
/usr/share/doc \
/usr/share/doc-base
RUN pip install wheel
COPY . /tmp/ranger
WORKDIR /tmp/ranger
RUN pip install --default-timeout=100 -r requirements.txt
RUN python setup.py install
# Create user ranger
RUN useradd -u 1000 -ms /bin/bash ranger
# Change permissions
RUN chown -R ranger: /home/ranger \
&& mkdir /var/log/ranger \
&& mkdir -p /opt/app \
&& mkdir /opt/app/git_repo \
&& chown -R ranger: /var/log/ranger \
&& mv /tmp/ranger /opt/app/ranger
# Set work directory
USER root
WORKDIR /opt/app/ranger