-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
48 lines (47 loc) · 1.29 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
FROM alpine:latest
ENV OCSERV_VERSION=1.3.0
RUN set -ex \
&& apk add --no-cache --virtual .build-dependencies \
readline-dev \
libnl3-dev \
xz \
openssl \
make \
gcc \
autoconf \
musl-dev \
wget \
linux-headers \
gnutls-dev \
linux-pam-dev \
libseccomp-dev \
lz4-dev \
libev-dev \
protobuf-c-dev \
krb5-dev \
gnutls-utils \
oath-toolkit-dev \
libmaxminddb-dev \
&& wget ftp://ftp.infradead.org/pub/ocserv/ocserv-$OCSERV_VERSION.tar.xz \
&& mkdir -p /etc/ocserv \
&& tar xf ocserv-$OCSERV_VERSION.tar.xz \
&& rm ocserv-$OCSERV_VERSION.tar.xz \
&& cd ocserv-$OCSERV_VERSION \
&& ./configure \
&& make \
&& make install \
&& cd .. \
&& rm -rf ocserv-$OCSERV_VERSION \
&& mkdir -p /etc/ocserv/certs \
&& cd /etc/ocserv/certs \
&& touch /etc/ocserv/ocpasswd \
&& apk del .build-dependencies \
&& apk add --no-cache gnutls linux-pam krb5-libs libtasn1 oath-toolkit-liboath nettle libev protobuf-c musl lz4-libs libseccomp readline libnl3 iptables curl \
&& rm -rf /var/cache/apk/*
WORKDIR /etc/ocserv
COPY ocserv.conf /etc/ocserv.conf
COPY entrypoint.sh /entrypoint.sh
EXPOSE 443/tcp
EXPOSE 443/udp
ENTRYPOINT ["sh", "/entrypoint.sh"]
CMD ["ocserv", "-c", "/etc/ocserv.conf", "-f"]