Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Dockerfile.armv7 #353

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,23 @@ install:
# Assist with ci test debugging:
# - DEBUG=1
before_script:
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
- image="kylemanna/openvpn"
- image_arm="kylemanna/openvpn-arm"
- docker build -t "$image" .
- docker build -f Dockerfile.armv7 -t "$image_arm" .
- docker inspect "$image"
- docker inspect "$image_arm"
- docker run --rm "$image" openvpn --version || true # why does it return 1?
- docker run --rm "$image_arm" openvpn --version || true # why does it return 1?
- docker run --rm "$image" openssl version
- docker run --rm "$image_arm" openssl version

script:
- official-images/test/run.sh "$image"
- test/run.sh "$image"
- official-images/test/run.sh "$image_arm"
- test/run.sh "$image_arm"

after_script:
- docker images
34 changes: 34 additions & 0 deletions Dockerfile.armv7
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Original credit: https://github.com/jpetazzo/dockvpn

# Smallest base image
FROM hypriot/rpi-alpine

LABEL maintainer="Kyle Manna <[email protected]>"

RUN echo "http:https://dl-4.alpinelinux.org/alpine/edge/community/" >> /etc/apk/repositories && \
echo "http:https://dl-4.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \
apk add --update openvpn iptables bash easy-rsa openvpn-auth-pam google-authenticator pamtester && \
ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*

# Needed by scripts
ENV OPENVPN /etc/openvpn
ENV EASYRSA /usr/share/easy-rsa
ENV EASYRSA_PKI $OPENVPN/pki
ENV EASYRSA_VARS_FILE $OPENVPN/vars

# Prevents refused client connection because of an expired CRL
ENV EASYRSA_CRL_DAYS 3650

VOLUME ["/etc/openvpn"]

# Internally uses port 1194/udp, remap using `docker run -p 443:1194/tcp`
EXPOSE 1194/udp

CMD ["ovpn_run"]

ADD ./bin /usr/local/bin
RUN chmod a+x /usr/local/bin/*

# Add support for OTP authentication using a PAM module
ADD ./otp/openvpn /etc/pam.d/