-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.debian9
49 lines (49 loc) · 1.43 KB
/
Dockerfile.debian9
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
FROM debian:9
ENV DEBEMAIL="[email protected]" DEBFULLNAME="Tatsushi Demachi"
ARG PKGVER
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bison \
build-essential \
cmake \
curl \
dh-make \
dh-systemd \
fakeroot \
git \
libio-socket-ssl-perl \
libjson-perl \
libpath-tiny-perl \
libplack-perl \
libscope-guard-perl \
libssl-dev \
libtest-exception-perl \
libtest-tcp-perl \
liburi-perl \
libuv1-dev \
netcat \
pkg-config \
ruby \
ruby-dev \
starlet \
sudo \
zlib1g-dev
RUN useradd -ms /bin/bash builder \
&& echo "builder ALL=NOPASSWD: ALL" > /etc/sudoers.d/builder \
&& chmod 440 /etc/sudoers.d/builder
ENV HOME=/home/builder
USER builder
COPY src/v${PKGVER}.tar.gz $HOME/
RUN mkdir -p $HOME/h2o/h2o-${PKGVER} \
&& cd $HOME/h2o/h2o-${PKGVER} \
&& tar xzf $HOME/v${PKGVER}.tar.gz --strip-components=1 \
&& tar cJf ../h2o_${PKGVER}.orig.tar.xz .
ADD src/debian/ $HOME/h2o/h2o-${PKGVER}/debian/
RUN cd $HOME/h2o/h2o-${PKGVER} \
&& sudo chown -R builder:builder debian \
&& mv -f debian/changelog.debian9 debian/changelog \
&& rm -f debian/changelog.*
RUN cd $HOME/h2o/h2o-${PKGVER} \
&& dpkg-buildpackage -us -uc \
&& tar -czf /tmp/h2o.tar.gz -C $HOME/h2o --exclude=./h2o-${PKGVER} .
CMD ["/bin/true"]