Fix placements of docs, samples, certification in the Dockerfile

Now all task samples, docs and certification related files moved
into /opt/rally/. Add proper info in the docs. Add message of the
day to say about certification, samples and docs allocation to user.

Change-Id: Ic0b36c80ddf04efcc92c816ee012f7c4fe955142
This commit is contained in:
pomeo92 2015-12-07 18:18:44 +02:00 committed by Roman Vasilets
parent e8ba46705b
commit 183afef9b0
2 changed files with 17 additions and 7 deletions

View File

@ -12,7 +12,7 @@ RUN wget https://bootstrap.pypa.io/get-pip.py && \
# create rally user # create rally user
RUN useradd -u 65500 -m rally && \ RUN useradd -u 65500 -m rally && \
ln -s /usr/share/doc/rally /home/rally/rally-docs ln -s /opt/rally/doc /home/rally/rally-docs
# install rally. the COPY command below frequently invalidates # install rally. the COPY command below frequently invalidates
# subsequent cache # subsequent cache
@ -21,9 +21,9 @@ WORKDIR /tmp/rally
RUN ./install_rally.sh --system --verbose --yes \ RUN ./install_rally.sh --system --verbose --yes \
--db-name /home/rally/.rally.sqlite && \ --db-name /home/rally/.rally.sqlite && \
pip install -r optional-requirements.txt && \ pip install -r optional-requirements.txt && \
chmod -R u=rwX,go=rX /etc/rally && \ mkdir /opt/rally/ && \
mv doc /usr/share/doc/rally && \ mv certification/ samples/ doc/ /opt/rally/ && \
mv samples ~/ && \ chmod -R u=rwX,go=rX /opt/rally /etc/rally && \
rm -rf /tmp/* && \ rm -rf /tmp/* && \
apt-get -y remove \ apt-get -y remove \
build-essential \ build-essential \
@ -34,11 +34,20 @@ RUN ./install_rally.sh --system --verbose --yes \
apt-get -y autoremove && \ apt-get -y autoremove && \
apt-get clean apt-get clean
RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
>> /etc/bash.bashrc; echo -e 'Welcome to Rally Docker container!\n\
Rally certification tasks, samples and docs are located at /opt/rally/\n\
Rally at readthedocs - http://rally.readthedocs.org\n\
How to contribute - http://rally.readthedocs.org/en/latest/contribute.html\n\
If you have any questions, you can reach the Rally team by:\n\
* e-mail - openstack-dev@lists.openstack.org with tag [Rally] in subject\n\
* irc - "#openstack-rally" channel at freenode.net' > /etc/motd
VOLUME ["/home/rally"] VOLUME ["/home/rally"]
WORKDIR /home/rally WORKDIR /home/rally/
USER rally USER rally
ENV HOME /home/rally ENV HOME /home/rally/
CMD ["bash", "--login"] CMD ["bash", "--login"]
RUN rally-manage db recreate RUN rally-manage db recreate

View File

@ -162,7 +162,8 @@ be done by the following steps:
likely to work if your home directory has excessively open likely to work if your home directory has excessively open
permissions (e.g., ``0755``), which is not recommended. permissions (e.g., ``0755``), which is not recommended.
You may want to save the last command as an alias: All task samples, docs and certification tasks you could find at /opt/rally/.
Also you may want to save the last command as an alias:
.. code-block:: bash .. code-block:: bash