summaryrefslogtreecommitdiffstats
path: root/03-guam/Dockerfile
blob: cde91c7dc7e7519f40f6baf43079062a468ac6ff (plain)
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
42
43
44
45
46
47
48
49
FROM kolab/base:latest

ENV GUAM_BRANCH master

RUN yum -y install \
        erlang-eimap \
        erlang-erts \
        erlang-goldrush \
        erlang-lager \
        erlang-rebar \
        make && \
    yum clean all

RUN git clone \
        -b ${GUAM_BRANCH} \
        https://git.kolab.org/diffusion/G/guam.git \
        /root/guam.git

WORKDIR /root/guam.git/

RUN timeout 60s rebar get-deps
RUN timeout 60s rebar compile
RUN timeout 60s rebar eunit
RUN mkdir -p deps

WORKDIR /root/guam.git/rel/

RUN timeout 60s rebar generate

WORKDIR /root/guam.git/

ADD /entrypoint.sh /entrypoint.sh
RUN chmod a+x /entrypoint.sh

RUN mkdir -p \
        /etc/guam/ && \
    mv -v \
        $(ls -1d /root/guam.git/rel/kolab_guam/releases/*/)/sys.config \
        /etc/guam/sys.config && \
    ln -s \
        /etc/guam/sys.config \
        $(ls -1d /root/guam.git/rel/kolab_guam/releases/*/)/.

EXPOSE 143 993

CMD [ \
        "rel/kolab_guam/bin/kolab_guam", \
        "foreground" \
    ]