summaryrefslogtreecommitdiff
path: root/images/obfsvpn-client/Dockerfile
blob: d1c5b16f5a6a614b23c565593ce254e69f19297f (plain)
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
FROM golang:1.17 AS builder

ENV SOURCE_PATH ${GOPATH}/src/0xacab.org/leap/obfsvpn
COPY . ${SOURCE_PATH}/
WORKDIR ${SOURCE_PATH}
RUN make build-client && cp obfsvpn-client /obfsvpn-client


FROM alpine:3.14.1

ENV OBFS4_CERT "8nuAbPJwFrKc/29KcCfL5LBuEWxQrjBASYXdUbwcm9d9pKseGK4r2Tg47e23+t6WghxGGw"
# copy obfsvpn-client from builder
COPY --from=builder /obfsvpn-client /usr/bin/
# Install openvpn
RUN apk --no-cache --no-progress upgrade && \
    apk --no-cache --no-progress add bash curl ip6tables iptables openvpn \
                shadow dumb-init tzdata && \
    addgroup -S vpn && \
    rm -rf /tmp/*

COPY images/obfsvpn-client/start.sh /usr/bin/

VOLUME ["/vpn"]

ENTRYPOINT ["dumb-init", "/usr/bin/start.sh"]