-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
36 lines (33 loc) · 1.04 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
FROM alpine
MAINTAINER Lars K.W. Gohlke <[email protected]>
ENV URL https://github.com/h2o/h2o.git
ENV VERSION tags/v1.4.0
RUN apk update \
&& apk upgrade \
# need for ocsp stapling \
&& apk add -U perl openssl \
# save state before installed packages for building \
&& grep ^P /lib/apk/db/installed | sed -e 's#^P:##g' | sort > /before \
&& apk add -U build-base \
cmake \
git \
linux-headers \
zlib-dev \
ca-certificates \
&& git clone $URL h2o \
&& cd h2o \
&& git checkout $VERSION \
&& cmake -DWITH_BUNDLED_SSL=on . \
&& make install \
&& cd .. \
&& rm -rf h2o \
# remove packages installed just for building \
&& grep ^P /lib/apk/db/installed | sed -e 's#^P:##g' | sort > /after \
&& diff /before /after | grep -e "^+[^+]" | sed -e 's#+##g' | xargs -n1 apk del \
&& rm /before /after \
&& rm -rf /var/cache/apk/*
RUN mkdir /etc/h2o
ADD h2o.conf /etc/h2o/
WORKDIR /etc/h2o
EXPOSE 80 443
CMD h2o