]> git.ipfire.org Git - pbs.git/blob - Dockerfile.in
systemd: Add unit files for hub
[pbs.git] / Dockerfile.in
1 FROM ipfire/pakfire:latest
2 MAINTAINER jonatanschlag
3
4 LABEL \
5 org.ipfire.pakfire.name = "@PACKAGE_NAME@" \
6 org.ipfire.pakfire.url = "https://pakfire.ipfire.org" \
7 org.ipfire.pakfire.vendor = "IPFire Project" \
8 org.ipfire.pakfire.version = "@PACKAGE_VERSION@"
9
10 # Install all dependencies
11 RUN yum install -y \
12 autoconf \
13 intltool \
14 make \
15 openssl-perl \
16 python2-pip \
17 python-daemon \
18 python-ldap \
19 python-markdown \
20 python-memcached \
21 python-psycopg2 \
22 python-tornado \
23 pytz-2016.10 \
24 && yum clean all
25
26 # Install more python dependencies
27 RUN pip install geoip2
28
29 # Create a user
30 RUN groupadd -g 2000 pbs && \
31 useradd --system --no-create-home --shell /bin/bash --uid 2000 --gid 2000 pbs
32
33 # Install LDAP certificate
34 RUN mkdir -p /etc/openldap/cacerts
35 COPY src/misc/lets-encrypt-x3-cross-signed.pem /etc/openldap/cacerts/
36 RUN c_rehash -v /etc/openldap/cacerts
37
38 # Copy the source code
39 COPY . /build/pakfire-build-service
40
41 WORKDIR /build/pakfire-build-service
42
43 # Compile the build service
44 RUN ./autogen.sh && \
45 ./configure --prefix=/usr --sysconfdir=/etc \
46 && make && make check && make install && rm -rf /build/pakfire-build-service
47
48 # Go back to /root
49 WORKDIR /root
50
51 # Cleanup
52 RUN yum remove -y *-devel && yum autoremove -y && yum clean all
53
54 USER pbs
55
56 # Define default command.
57 CMD ["/bin/bash"]
58