@@ -3,8 +3,6 @@ FROM alpine:3.20.1
3
3
LABEL maintainer=
"Amin Vakil <[email protected] >, Dmitry Romashov <[email protected] >"
4
4
5
5
ENV OC_VERSION=1.3.0
6
- ENV OC_IPV4_NETWORK="192.168.99.0"
7
- ENV OC_IPV4_NETMASK="255.255.255.0"
8
6
9
7
RUN apk add --no-cache bash
10
8
@@ -47,28 +45,26 @@ RUN buildDeps=( \
47
45
| sort -u \
48
46
)" \
49
47
&& readarray runDepsArr <<< "$runDeps" \
50
- && apk add --virtual .run-deps "${runDepsArr[@]}" gnutls-utils iptables libnl3 readline libseccomp-dev lz4-dev gettext-envsubst \
48
+ && apk add --virtual .run-deps "${runDepsArr[@]}" gnutls-utils iptables libnl3 readline libseccomp-dev lz4-dev \
51
49
&& apk del .build-deps \
52
50
&& rm -rf /var/cache/apk/*
53
51
54
52
# Setup config
55
53
COPY routes.txt /tmp/
56
-
57
- # hadolint ignore=SC2016
58
54
RUN set -x \
59
- && sed -e 's/\.\/ sample\. passwd/\/ etc\/ ocserv\/ ocpasswd/' \
60
- -e 's/\( max-same-clients = \) 2/\1 10/' \
61
- -e 's/\.\.\/ tests/\/ etc\/ ocserv/' \
62
- -e 's/#\( compression.*\) /\1 /' \
63
- -e '/^ipv4-network = /{s/192.168.1.0/${OC_IPV4_NETWORK} /}' \
64
- -e '/^ipv4-netmask = /{s/255.255.255.0/${OC_IPV4_NETMASK}/}' \
65
- -e 's/192.168.1.2/8.8.8.8/' \
66
- -e 's/^route/#route/' \
67
- -e 's/^no-route/#no-route/' \
68
- -e '/\[ vhost:www.example.com \] /,$d' \
69
- -e '/^cookie-timeout = /{s/300/3600/}' \
70
- -e 's/^isolate-workers/#isolate-workers/' /etc/ocserv/ocserv.conf > /tmp /ocserv.conf \
71
- && cat /tmp/routes.txt >> /tmp/ocserv.conf
55
+ && sed -i 's/\.\/ sample\. passwd/\/ etc\/ ocserv\/ ocpasswd/' /etc/ocserv/ocserv.conf \
56
+ && sed -i 's/\( max-same-clients = \) 2/\1 10/' /etc/ocserv/ocserv.conf \
57
+ && sed -i 's/\.\.\/ tests/\/ etc\/ ocserv/' /etc/ocserv/ocserv.conf \
58
+ && sed -i 's/#\( compression.*\) /\1 /' /etc/ocserv/ocserv.conf \
59
+ && sed -i '/^ipv4-network = /{s/192.168.1.0/192.168.99.0 /}' /etc/ocserv/ocserv.conf \
60
+ && sed -i 's/192.168.1.2/8.8.8.8/' /etc/ocserv/ocserv.conf \
61
+ && sed -i 's/^route/#route/' /etc/ocserv/ocserv.conf \
62
+ && sed -i 's/^no- route/#no- route/' /etc/ocserv/ocserv.conf \
63
+ && sed -i '/ \[ vhost:www.example.com \] /,$d' /etc/ocserv/ocserv.conf \
64
+ && sed -i '/^cookie-timeout = /{s/300/3600/}' /etc/ocserv/ocserv.conf \
65
+ && sed -i 's/^isolate-workers/#isolate-workers/' /etc/ocserv/ocserv.conf \
66
+ && cat /tmp/routes.txt >> /etc/ocserv /ocserv.conf \
67
+ && rm -rf /tmp/routes.txt
72
68
73
69
WORKDIR /etc/ocserv
74
70
0 commit comments