-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Dockerfile_debian
39 lines (34 loc) · 1.82 KB
/
Dockerfile_debian
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
# ----------------------------------------------------------------------------#
# This Dockerfile creates a Debian package for mailpile. #
# #
# Usage: cd .. && make dpkg #
# ----------------------------------------------------------------------------#
FROM debian:stretch
MAINTAINER Alexandre Viau <[email protected]>
# The big list below is a subset of what we get from mk-build-deps; manually
# copied so the Docker intermediate images will change a little bit less when
# the Debian package rules themselves get updated. Less wasted bandwidth,
# quicker development cycles...
RUN apt-get update && \
apt-get install -y -qq software-properties-common \
build-essential \
debhelper \
devscripts \
equivs \
python-all python-bs4 python-dns python-funcsigs \
python-jinja2 python-lxml python-markupsafe \
python-mock python-nose python-pbr python-pgpdump \
python-pil python-selenium python-setuptools python-webencodings \
python-socksipychain xdg-utils
RUN mkdir /root/mailpile /mnt/dist
COPY packages/debian /root/mailpile/debian
COPY dist/version.txt /root/mailpile-version.txt
VOLUME /mnt/dist
RUN ln -s /mnt/dist/mailpile.tar.gz /root/mailpile_$(cat /root/mailpile-version.txt).orig.tar.gz
RUN sed -i "s|<-- version -->|$(cat /root/mailpile-version.txt)-1|" /root/mailpile/debian/changelog
RUN mk-build-deps --install /root/mailpile/debian/control --tool "apt-get --force-yes -y"
WORKDIR /root/mailpile
ENV DESTINATION_DPKG_DIR /mnt/dist
CMD tar xvf ../mailpile_$(cat /root/mailpile-version.txt).orig.tar.gz -C ./ \
&& dpkg-buildpackage -us -uc -b \
&& cp ../*.deb /mnt/dist