Update Dockerfile to use new install_rally.sh
This delegates more of the magic to the install script, and also has some improvements to the Dockerfile and the related documentation. Closes-Bug: #1461894 Change-Id: I86c0e439b8d0d8f40197fb4a8e26b2655036949c
This commit is contained in:
parent
de623eabf3
commit
0ec0bfe400
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
rally-jobs
|
||||||
|
tests
|
||||||
|
Dockerfile
|
||||||
|
contrib
|
||||||
|
test-requirements.txt
|
||||||
|
tox.ini
|
69
Dockerfile
69
Dockerfile
@ -1,27 +1,50 @@
|
|||||||
FROM ubuntu:14.04
|
FROM ubuntu:14.04
|
||||||
MAINTAINER Sergey Skripnick <sskripnick@mirantis.com>
|
MAINTAINER Sergey Skripnick <sskripnick@mirantis.com>
|
||||||
|
|
||||||
|
# install prereqs
|
||||||
|
RUN apt-get update && apt-get install --yes wget python
|
||||||
|
|
||||||
|
# ubuntu's pip is too old to work with the version of requests we
|
||||||
|
# require, so get pip with get-pip.py
|
||||||
|
RUN wget https://bootstrap.pypa.io/get-pip.py && \
|
||||||
|
python get-pip.py && \
|
||||||
|
rm -f get-pip.py
|
||||||
|
|
||||||
|
# create rally user
|
||||||
|
RUN useradd -u 65500 -m rally && \
|
||||||
|
ln -s /usr/share/doc/rally /home/rally/rally-docs
|
||||||
|
|
||||||
|
# install rally. the COPY command below frequently invalidates
|
||||||
|
# subsequent cache
|
||||||
COPY . /tmp/rally
|
COPY . /tmp/rally
|
||||||
RUN apt-get update && \
|
WORKDIR /tmp/rally
|
||||||
apt-get -y install git python2.7 bash-completion python-dev libffi-dev \
|
RUN ./install_rally.sh --system --verbose --yes \
|
||||||
libxml2-dev libxslt1-dev libssl-dev libpq-dev wget \
|
--db-name /home/rally/.rally.sqlite && \
|
||||||
build-essential &&\
|
pip install -r optional-requirements.txt && \
|
||||||
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py -O /tmp/pip.py &&\
|
chmod -R u=rwX,go=rX /etc/rally && \
|
||||||
python /tmp/pip.py && rm /tmp/pip.py &&\
|
mv doc /usr/share/doc/rally && \
|
||||||
cd /tmp/rally &&\
|
mv samples ~/ && \
|
||||||
./install_rally.sh &&\
|
rm -rf /tmp/* && \
|
||||||
pip install -r optional-requirements.txt &&\
|
apt-get -y remove \
|
||||||
sed 's|#*connection *=.*|connection = sqlite:////home/rally/.rally.sqlite|' -i /etc/rally/rally.conf &&\
|
build-essential \
|
||||||
apt-get -y remove libssl-dev libffi-dev python-dev libxml2-dev \
|
gcc-4.8 \
|
||||||
libxslt1-dev build-essential gcc-4.8 python3 && \
|
libffi-dev \
|
||||||
apt-get -y autoremove &&\
|
libssl-dev \
|
||||||
apt-get clean &&\
|
libxml2-dev \
|
||||||
mv doc /usr/share/doc/rally &&\
|
libxslt1-dev \
|
||||||
rm -fr /tmp/* &&\
|
python-dev \
|
||||||
rm -rf /var/lib/apt/lists/* &&\
|
python3 \
|
||||||
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 10 &&\
|
&& \
|
||||||
useradd -u 65500 -m rally &&\
|
apt-get -y autoremove && \
|
||||||
ln -s /usr/share/doc/rally /home/rally/rally-docs
|
apt-get clean
|
||||||
USER rally
|
|
||||||
CMD bash --login
|
VOLUME ["/home/rally"]
|
||||||
ENV HOME /home/rally
|
|
||||||
WORKDIR /home/rally
|
WORKDIR /home/rally
|
||||||
|
USER rally
|
||||||
|
ENV HOME /home/rally
|
||||||
|
CMD ["bash", "--login"]
|
||||||
|
|
||||||
|
# TODO(stpierre): Find a way to use `rally` as the
|
||||||
|
# entrypoint. Currently this is complicated by the need to run
|
||||||
|
# rally-manage to create the database.
|
||||||
|
Loading…
Reference in New Issue
Block a user