refstack/docker/Dockerfile
sslypushenko b0a079fdb9 Remove IPython from RefStack container
RefStack does not depend on IPython, so it needs to be removed

Fixes: https://storyboard.openstack.org/#!/story/2001003

Change-Id: Ife91af120acaaf939344c56169b79b4e084a3aaf
2017-04-26 10:20:37 +03:00

45 lines
1.2 KiB
Docker

FROM ubuntu:14.04
RUN \
groupadd dev && \
useradd -g dev -s /bin/bash -d /home/dev -m dev && \
( umask 226 && echo "dev ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/50_dev )
ENV DEBIAN_FRONTEND noninteractive
RUN \
apt-get update && \
apt-get -y install \
sudo git vim wget \
nginx \
python-dev python3-dev python-pip \
libmysqlclient-dev mysql-client-5.6 mysql-server-5.6 libffi-dev\
npm && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/lib/mysql/* && \
rm -rf /etc/nginx/sites-enabled/default
RUN \
pip install virtualenv tox httpie && \
ln -s /usr/bin/nodejs /usr/bin/node
ADD /docker/scripts/* /usr/bin/
ADD . /refstack
ENV PYTHONPATH=/home/dev/refstack \
SQL_DIR=/home/dev/mysql
ENV REFSTACK_MYSQL_URL="mysql+pymysql://root@localhost/refstack?unix_socket=${SQL_DIR}/mysql.socket&charset=utf8"
USER dev
RUN \
echo "cd /home/dev/refstack" >> /home/dev/.bashrc &&\
echo "alias activate='source /home/dev/refstack/.venv/bin/activate'" >> /home/dev/.bashrc &&\
echo "alias mysql='mysql --no-defaults -S ${SQL_DIR}/mysql.socket'" >> /home/dev/.bashrc &&\
start.sh &&\
api-init-db
CMD start.sh -s
EXPOSE 443