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

RUN apt-get update \
Fernando Verdugo's avatar
Fernando Verdugo committed
6
 && DEBIAN_FRONTEND="noninteractive" TZ=$TZ apt-get install -y -q --no-install-recommends \
Fernando Verdugo's avatar
Fernando Verdugo committed
7
8
9
10
    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
    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 \
15
    libio-stringy-perl libvirt-daemon-system libvirt-clients netcat-openbsd qemu-kvm qemu-utils iproute2 wget bridge-utils firewalld dnsmasq iptables ebtables iptstate \
16
    libnet-openssh-perl libdatetime-format-dateparse-perl file tzdata libxml2-utils libfile-tee-perl \
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

21
RUN echo "listen_tls = 0" >> /etc/libvirt/libvirtd.conf \
Fernando Verdugo's avatar
Fernando Verdugo committed
22
23
24
25
26
27
28
29
30
 && 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 /

31
32
EXPOSE 5900-5938
EXPOSE 5940-5950
Fernando Verdugo's avatar
Fernando Verdugo committed
33
34
35
36
37
38
39
40
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
41
ENV PERL5LIB /ravada/lib
Fernando Verdugo's avatar
Fernando Verdugo committed
42
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]