forked from sba1/simplemail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (47 loc) · 1.4 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
#
# A simple docker file for building and unit testing
#
# Build with --build-arg="apt_proxy=$apt_proxy" for using an proxy for apt
#
# Our build requirements
FROM debian:jessie
ARG apt_proxy=""
RUN if [ -n "$apt_proxy" ]; then echo 'Acquire::http { Proxy "'$apt_proxy'"; }' >>/etc/apt/apt.conf; fi
# Add adtools repo
RUN echo deb http://dl.bintray.com/sba1/adtools-deb / >>/etc/apt/sources.list
RUN apt-get update
RUN apt-get dist-upgrade -y
RUN apt-get install -y --no-install-recommends \
lhasa \
libcunit1-dev \
valgrind \
wget
RUN apt-get install -y --force-yes --no-install-recommends \
adtools-binutils \
adtools-sdk \
adtools-gcc
RUN apt-get install -y --no-install-recommends \
libglib2.0-dev \
bzip2 \
pkg-config \
make \
libssl-dev \
libgtk2.0-dev \
gcc
RUN useradd simplemail -m
WORKDIR /home/simplemail
RUN mkdir -p /home/simplemail/simplemail/tests
# Build and configure dovecot
COPY tests/makefile /home/simplemail/simplemail/tests/makefile
COPY common-sources.mk /home/simplemail/simplemail/common-sources.mk
RUN chown -R simplemail /home/simplemail/simplemail
USER simplemail
ENV USER simplemail
RUN make -C /home/simplemail/simplemail/tests dovecot-bin
# Execute tests
COPY . /home/simplemail/simplemail/
USER root
RUN chown -R simplemail /home/simplemail/simplemail
USER simplemail
WORKDIR /home/simplemail/simplemail
RUN make -C /home/simplemail/simplemail/tests