-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
66 lines (50 loc) · 1.38 KB
/
Dockerfile
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM alpine:3.9 as build1
RUN apk --no-cache add gcc
RUN apk --no-cache add g++
RUN apk --no-cache add libc-dev
RUN apk --no-cache add zlib-dev
RUN apk --no-cache add openssl-dev
RUN apk --no-cache add git
RUN apk --no-cache add autoconf automake make
RUN cd /usr/lib && ln -s libboost_thread-mt.so libboost_thread.so
WORKDIR /
RUN echo trigger6
RUN git clone https://github.com/yshurik/notbit.git
#COPY notbit /notbit
WORKDIR /notbit
RUN git checkout smtp
RUN ./autogen.sh --prefix=/ # || cat config.log
WORKDIR /
COPY notbit-alpine.patch /1.patch
RUN patch -p0 < 1.patch
WORKDIR /notbit
#RUN make clean
RUN make
RUN make install
RUN notbit -h || echo ok
RUN ldd /bin/notbit
FROM alpine:3.9 as notbit1
RUN apk --no-cache add zlib
RUN apk --no-cache add openssl
COPY --from=build1 /bin/notbit /bin/notbit
COPY --from=build1 /bin/notbit-keygen /bin/notbit-keygen
COPY --from=build1 /bin/notbit-sendmail /bin/notbit-sendmail
RUN ldd /bin/notbit
COPY entrypoint.sh /entrypoint.sh
COPY firstrun.sh /firstrun.sh
RUN mkdir /data
RUN mkdir /data/notbit
RUN mkdir /data/maildir
EXPOSE 8444 2525 143
RUN apk --no-cache add bash
RUN apk --no-cache add dovecot
COPY dovecot.conf /etc/dovecot/dovecot.conf
RUN adduser -D bm
RUN echo bm:bm | chpasswd
RUN cd /home/bm && ln -s /data/maildir
RUN chown -R -c bm:bm /data
RUN ls -al /data
VOLUME ["/data"]
RUN ls -al /data
WORKDIR /data
ENTRYPOINT ["/entrypoint.sh"]