wiki: Reduce image size to 920px
[ipfire.org.git] / Dockerfile
1 FROM centos:latest
2
3 EXPOSE 80
4
5 # Enable EPEL
6 RUN yum install -y epel-release
7
8 # Install all updates
9 RUN yum update -y
10
11 # Install required packages
12 RUN yum install -y \
13         autoconf \
14         automake \
15         curl-devel \
16         gcc \
17         make \
18         openldap-devel \
19         python34 \
20         python34-devel \
21         python34-pip \
22         sassc \
23         \
24         /usr/share/hwdata/pci.ids \
25         /usr/share/hwdata/usb.ids
26
27 # Install Python packages
28 ADD requirements.txt .
29 RUN pip3 install -r requirements.txt
30
31 # Copy code into the container
32 COPY . /build/ipfire.org
33 WORKDIR /build/ipfire.org
34
35 # Install the webapp
36 RUN ./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc \
37         && make -j4 && make install
38
39 # Go back to /root
40 WORKDIR /root
41
42 # Run the webapp
43 CMD ["ipfire.org-webapp", "--debug", "--logging=debug", "--port=80"]