Dockerfile
changeset 2 79c7422f579b
parent 1 f15f00b6a8a9
child 3 7a5b244351d3
equal deleted inserted replaced
1:f15f00b6a8a9 2:79c7422f579b
     1 FROM debian:8
       
     2 
       
     3 ENV http_proxy http://172.17.42.1:3128/
       
     4 ENV DEBIAN_FRONTEND noninteractive 
       
     5 
       
     6 RUN \
       
     7  apt-get update && \
       
     8  apt-get upgrade -y && \
       
     9  apt-get dist-upgrade -y && \
       
    10  apt-get install --no-install-recommends -y \
       
    11  git gcc make pkg-config \
       
    12  libpcre3-dev libssl-dev libdb5.3-dev libmysqlclient-dev libpq-dev \
       
    13  libsqlite3-dev libldap2-dev libperl-dev autoconf \
       
    14  sudo net-tools
       
    15 
       
    16 # prepare user environment for running (exim) and testing exim (exim-test)
       
    17 RUN useradd --system -c 'Exim User' exim
       
    18 RUN useradd --home-dir /home/exim-test -G exim -c 'Exim Test User' -m exim-test
       
    19 
       
    20 # add additional files
       
    21 # (sudoers, Local/Makefile)
       
    22 COPY root/ /
       
    23 
       
    24 # add current working copy
       
    25 COPY exim/ /home/exim-test/exim/
       
    26 
       
    27 # prepare the build - files need to be owned
       
    28 # by exim-test
       
    29 WORKDIR /home/exim-test
       
    30 RUN chown -R exim-test: .
       
    31 
       
    32 # Build Exim
       
    33 USER exim-test
       
    34 WORKDIR /home/exim-test/exim/src
       
    35 RUN make -j -l 1
       
    36 
       
    37 
       
    38 # Prepare/Build the test-suite
       
    39 WORKDIR /home/exim-test/exim/test
       
    40 RUN mkdir /tmp/exim
       
    41 RUN echo $PWD/test-config > /tmp/exim/trusted-configs
       
    42 RUN autoconf
       
    43 RUN ./configure
       
    44 RUN make
       
    45 
       
    46 ## now finally run the tests
       
    47 ## should be done by you, manually :)
       
    48 # -> full hostname