|
@@ -1,30 +1,24 @@
|
1
|
|
-FROM debian:jessie
|
2
|
|
-
|
3
|
|
-MAINTAINER Robin Thoni <robin@rthoni.com>
|
|
1
|
+FROM debian:stretch as builder
|
4
|
2
|
|
5
|
3
|
RUN apt-get update &&\
|
6
|
|
- apt-get install -y gcc g++ cmake libssl-dev libjsoncpp-dev libmilter-dev git &&\
|
|
4
|
+ apt-get install -y gcc g++ cmake libssl-dev libjsoncpp-dev libmilter-dev wget unzip &&\
|
7
|
5
|
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
8
|
6
|
|
9
|
|
-RUN git clone https://git.rthoni.com/robin.thoni/milter-sasl &&\
|
|
7
|
+RUN wget https://git.rthoni.com/robin.thoni/milter-sasl/archive/v1.0.0.zip -O milter-sasl.zip &&\
|
|
8
|
+ unzip milter-sasl.zip &&\
|
10
|
9
|
cd milter-sasl &&\
|
11
|
10
|
mkdir build && cd build &&\
|
12
|
|
- cmake .. && make &&\
|
13
|
|
- cp src/milter-sasl /usr/local/bin
|
14
|
|
-
|
15
|
|
-RUN rm -rf /var/log/* &&\
|
16
|
|
- mkfifo /var/log/syslog &&\
|
17
|
|
- ln -s /dev/null /var/log/mail.log &&\
|
18
|
|
- ln -s /dev/null /var/log/mail.err &&\
|
19
|
|
- ln -s /dev/null /var/log/main.info &&\
|
20
|
|
- ln -s /dev/null /var/log/messages
|
|
11
|
+ cmake .. && make
|
21
|
12
|
|
22
|
|
-COPY ./config /etc/milter-sasl/
|
|
13
|
+FROM debian:stretch
|
23
|
14
|
|
24
|
|
-COPY ./vars-vars /etc/vars-vars
|
|
15
|
+ADD https://raw.githubusercontent.com/docker-gcf/docker-gcf/v1.5.0/setup.sh /tmp/docker-utils-setup.sh
|
|
16
|
+RUN sh /tmp/docker-utils-setup.sh
|
|
17
|
+ENTRYPOINT ["gcf-entrypoint"]
|
|
18
|
+CMD ["milter-sasl"]
|
25
|
19
|
|
26
|
|
-COPY ./vars-files /etc/vars-files
|
|
20
|
+RUN pkgs-install libjsoncpp1 libmilter1.0.1
|
27
|
21
|
|
28
|
|
-COPY ./run.sh /run.sh
|
|
22
|
+COPY --from=builder /milter-sasl/build/src/milter-sasl /usr/local/bin/
|
29
|
23
|
|
30
|
|
-CMD ["/run.sh"]
|
|
24
|
+COPY ./config /etc/salt/base/
|