Dockerfile 1.97 KB
Newer Older
Fernando Verdugo's avatar
Fernando Verdugo committed
1
2
3
4
5
6
7
8
9
10
FROM ubuntu:18.04
LABEL maintainer="ravada@telecos.upc.edu"
LABEL description="Ravada Backend + KVM"

RUN apt-get update \
 && apt-get install -y -q --no-install-recommends \
    perl libmojolicious-perl libauthen-passphrase-perl \
    libdbd-mysql-perl libdbi-perl libdbix-connector-perl libipc-run3-perl libnet-ldap-perl \
    libproc-pid-file-perl libsys-virt-perl libxml-libxml-perl libconfig-yaml-perl \
    libmoose-perl libjson-xs-perl perlmagick libmoosex-types-netaddr-ip-perl libsys-statistics-linux-perl \
11
    libio-interface-perl libnet-dns-perl liblocale-maketext-lexicon-perl \
Fernando Verdugo's avatar
Fernando Verdugo committed
12
13
14
15
    libmojolicious-plugin-i18n-perl libdbd-sqlite3-perl debconf adduser libdigest-sha-perl libnet-ssh2-perl \
    libfile-rsync-perl libdate-calc-perl libparallel-forkmanager-perl libdatetime-perl libencode-locale-perl netcat-openbsd \
    liblwp-useragent-determined-perl libvirt-clients supervisor net-tools openssh-client apt-utils curl libpbkdf2-tiny-perl \
    libio-stringy-perl libvirt-daemon-system libvirt-clients netcat-openbsd qemu-kvm qemu-utils iproute2 wget bridge-utils firewalld dnsmasq iptables ebtables \
16
    libnet-openssh-perl libdatetime-format-dateparse-perl file\
Francesc Guasch's avatar
Francesc Guasch committed
17
 && apt-get clean \
Fernando Verdugo's avatar
Fernando Verdugo committed
18
 && rm -rf /var/lib/apt/lists/*
19
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
Fernando Verdugo's avatar
Fernando Verdugo committed
20

Francesc Guasch's avatar
Francesc Guasch committed
21
22
23
ENV TZ=Europe/Madrid
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata \

24
RUN echo "listen_tls = 0" >> /etc/libvirt/libvirtd.conf \
Fernando Verdugo's avatar
Fernando Verdugo committed
25
26
27
28
29
30
31
32
33
 && echo 'listen_tcp = 1' >> /etc/libvirt/libvirtd.conf \
#  && mkdir -p /root/.ssh \
#  && echo "Host ravada-kvm StrictHostKeyChecking no" >/root/.ssh/config \
#  && chmod 600 /root/.ssh/config \
 && mkdir -p /var/log/supervisor \
 && mkdir -p /run/sshd

COPY network.sh default.xml /

34
35
EXPOSE 5900-5938
EXPOSE 5940-5950
Fernando Verdugo's avatar
Fernando Verdugo committed
36
37
38
39
40
41
42
43
EXPOSE 55900-55950

COPY supervisord.conf /etc/supervisord.conf

#RUN mkdir /ravada
#ADD src/ravada /ravada
COPY ravada.conf /etc/ravada.conf
WORKDIR /ravada
Francesc Guasch's avatar
Francesc Guasch committed
44
ENV PERL5LIB /ravada/lib
Fernando Verdugo's avatar
Fernando Verdugo committed
45
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]