forked from kylemanna/docker-openvpn
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from DNXLabs/upgrading_alpine
Updating Dockerfile
- Loading branch information
Showing
2 changed files
with
12 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,36 @@ | ||
# Original credit: https://github.com/jpetazzo/dockvpn | ||
|
||
FROM alpine:3.19.1 as awscli-installer | ||
|
||
# Install Python and pip | ||
RUN apk add --no-cache python3 py3-pip && \ | ||
python3 -m venv /awscli-venv && \ | ||
source /awscli-venv/bin/activate && \ | ||
pip install --upgrade pip && \ | ||
pip install awscli | ||
|
||
# Smallest base image | ||
FROM alpine:3.19.1 | ||
# Copy the virtual environment from the previous stage | ||
COPY --from=awscli-installer /awscli-venv /awscli-venv | ||
|
||
# Add the virtual environment to PATH so aws-cli commands can be used directly | ||
ENV PATH="/awscli-venv/bin:$PATH" | ||
|
||
LABEL maintainer="Kyle Manna <[email protected]>" | ||
|
||
# Testing: pamtester | ||
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \ | ||
apk add --update openvpn iptables bash easy-rsa openvpn-auth-pam google-authenticator pamtester libqrencode && \ | ||
ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \ | ||
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/* | ||
|
||
ENV AWSCLI_VERSION=1.32.1 | ||
|
||
RUN apk --no-cache update && \ | ||
apk --no-cache add python3 py3-pip py3-setuptools ca-certificates groff less bash make jq gettext-dev curl wget g++ zip git && \ | ||
python3 -m venv /awscli-venv && \ | ||
source /awscli-venv/bin/activate && \ | ||
pip install --no-cache-dir awscli==${AWSCLI_VERSION} && \ | ||
deactivate && \ | ||
update-ca-certificates && \ | ||
rm -rf /var/cache/apk/* | ||
|
||
ENV PATH="/awscli-venv/bin:$PATH" | ||
|
||
|
||
# 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 | ||
ENV EASYRSA=/usr/share/easy-rsa \ | ||
EASYRSA_CRL_DAYS=3650 \ | ||
EASYRSA_PKI=$OPENVPN/pki | ||
|
||
VOLUME ["/etc/openvpn"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters