forked from cpascual/taurus-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (41 loc) · 1.68 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM debian:stable
# Update the repo info
RUN apt-get update
# install and configure supervisor
RUN apt-get install -y supervisor
RUN mkdir -p /var/log/supervisor
# change installation dialogs policy to noninteractive
# otherwise debconf raises errors: unable to initialize frontend: Dialog
ENV DEBIAN_FRONTEND noninteractive
# change policy for starting services while installing
# otherwise policy-rc.d denies execution of start
# http://askubuntu.com/questions/365911/why-the-services-do-not-start-at-installation
# finally the approach is to not start services when building image
# the database will be fead from file, instead of creating tables
# RUN echo "exit 0" > /usr/sbin/policy-rc.d
# install mysql server
RUN apt-get install -y mysql-server
#install tango-db
#RUN apt-get install -y tango-db
#install tango-test DS
#RUN apt-get install -y tango-test
# install sardana dependencies
RUN apt-get install -y python ipython python-h5py python-lxml python-numpy\
python-nxs python-ply python-pytango python-qt4\
python-qwt5-qt4 python-spyderlib
# instal virtual monitor
RUN apt-get install -y xvfb
# configure virtual monitor env variable
ENV DISPLAY=:1.0
# configure supervisord
COPY supervisord.conf /etc/supervisor/conf.d/
# TODO: use just basic database, not the one with sardemo
# copy & untar mysql tango database (with sardemo) and change owner to mysql user
#ADD tangodbsardemo.tar /var/lib/mysql/
#RUN chown -R mysql /var/lib/mysql/tango
# define tango host env var
ENV TANGO_HOST=taurus-test:10000
# add USER ENV (necessary for spyderlib in taurus.qt.qtgui.editor)
ENV USER=root
# start supervisor as deamon
CMD ["/usr/bin/supervisord"]