-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (46 loc) · 1.3 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
47
48
49
50
51
52
53
54
#
# Dockerfile: Custom image to create a configuration file for PIA VPN native WireGuard connections.
#
#
# Default image tag that can be overridden using build args
#
ARG UBUNTU_TAG=latest
#
# Use the specified version of the Ubuntu image
#
FROM ubuntu:${UBUNTU_TAG}
#
# Default time zone and install location that can be overridden using build args
#
ARG TZ=America/New_York
ARG PIA_APP_HOME=/pia
#
# Use zero interaction for apt and set PIA scripts install location
#
ENV DEBIAN_FRONTEND=noninteractive \
TZ=${TZ} \
PIA_APP_HOME=${PIA_APP_HOME}
#
# Copy over the PIA manual connection scripts
#
COPY pia ${PIA_APP_HOME}
#
# Install required packages to generate PIA manual connection using wireguard
#
RUN echo "resolvconf resolvconf/linkify-resolvconf boolean false" | debconf-set-selections && \
# Update package lists
apt update -q && \
# Install required packages
apt -yq install curl jq wireguard-tools resolvconf && \
# Clean cache and remove all downloaded package files
apt -yq clean && apt-get autoclean && apt-get autoremove && \
# Remove package lists loaded by apt update
rm -rf /var/lib/apt/lists/*
#
# Set the working directory to the PIA scripts install location
#
WORKDIR ${PIA_APP_HOME}
#
# Run the setup script
#
CMD [ "sh", "-c", "${PIA_APP_HOME}/run_setup.sh" ]