-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile
46 lines (39 loc) · 1.05 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
FROM alpine:3.19 as builder
ARG OPENFORTIVPN_VERSION=v1.22.1
# Build openfortivpn binary
RUN apk update \
&& apk add --no-cache \
openssl-dev \
ppp \
ca-certificates \
curl \
&& apk add --no-cache --virtual .build-deps \
automake \
autoconf \
g++ \
gcc \
make \
&& mkdir -p "/usr/src/openfortivpn" \
&& cd "/usr/src/openfortivpn" \
&& curl -Ls "https://github.com/adrienverge/openfortivpn/archive/${OPENFORTIVPN_VERSION}.tar.gz" \
| tar xz --strip-components 1 \
&& aclocal \
&& autoconf \
&& automake --add-missing \
&& ./configure --prefix=/usr --sysconfdir=/etc \
&& make \
&& make install \
&& apk del .build-deps
# Build final image
FROM alpine:3.19
RUN apk add --no-cache \
ca-certificates \
openssl \
ppp \
curl \
su-exec \
socat
COPY --from=builder /usr/bin/openfortivpn /usr/bin/openfortivpn
COPY ./docker-entrypoint.sh /usr/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["openfortivpn"]