forked from lemonlatte/docker-webvirtmgr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (30 loc) · 1.17 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
FROM ubuntu:14.04
MAINTAINER K Larsonneur <[email protected]>
RUN apt-get -y update
RUN curl http://retspen.github.io/libvirt-bootstrap.sh | sudo sh
RUN apt-get -y install dbus -q
RUN apt-get -y install pwgen sasl2-bin -q
RUN apt-get -y install git python-pip python-libvirt python-libxml2 supervisor nginx
RUN git clone https://github.com/retspen/webvirtmgr
WORKDIR /webvirtmgr
RUN git checkout v4.8.8
RUN pip install -r requirements.txt
ADD local_settings.py /webvirtmgr/webvirtmgr/local/local_settings.py
RUN /usr/bin/python /webvirtmgr/manage.py collectstatic --noinput
ADD supervisor.webvirtmgr.conf /etc/supervisor/conf.d/webvirtmgr.conf
ADD nginx.webvirtmgr.conf /etc/nginx/sites-available/webvirtmgr
ADD start.sh /start.sh
RUN chmod +x /start.sh
RUN /start.sh
RUN rm -rf /start.sh
ADD bootstrap.sh /webvirtmgr/bootstrap.sh
RUN mkdir /var/local/webvirtmgr
RUN chown www-data:www-data -R /webvirtmgr
RUN chown www-data:www-data -R /var/local/webvirtmgr
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
RUN ln -s /etc/nginx/sites-available/webvirtmgr /etc/nginx/sites-enabled
RUN apt-get -ys clean
WORKDIR /
VOLUME /var/local/webvirtmgr
EXPOSE 8080 16509
CMD ["supervisord", "-n"]