Update Dockerfile

install wireguard
copy wireguard config

added wireguarg config

Update Dockerfile

Update Dockerfile

a

cleanup
This commit is contained in:
jaannnis 2023-09-24 15:15:54 +02:00 committed by BuildTools
parent 02f8e58e47
commit 3cced1d334
8 changed files with 22 additions and 2 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
# Wireguard configs, you never know
wg*.conf
# Windows image file caches # Windows image file caches
Thumbs.db Thumbs.db
ehthumbs.db ehthumbs.db

View file

@ -26,12 +26,14 @@ ENV DEBIAN_FRONTEND="noninteractive" \
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)" PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
RUN \ RUN \
echo "**** install runtime packages ****" && \ echo "**** install runtime packages & wireguard ****" && \
apt-get update && \ apt-get update && \
apt-get install -y \ apt-get install -y \
jq \ jq \
udev \ udev \
wget && \ wget \
iproute2 \
wireguard-tools &&\
echo "**** install plex ****" && \ echo "**** install plex ****" && \
if [ -z ${PLEX_RELEASE+x} ]; then \ if [ -z ${PLEX_RELEASE+x} ]; then \
PLEX_RELEASE=$(curl -sX GET 'https://plex.tv/api/downloads/5.json' \ PLEX_RELEASE=$(curl -sX GET 'https://plex.tv/api/downloads/5.json' \
@ -54,6 +56,9 @@ RUN \
# add local files # add local files
COPY root/ / COPY root/ /
# add wireguard config
COPY ./wg0.conf /etc/wireguard/wg0.conf
# add unrar # add unrar
COPY --from=unrar /usr/bin/unrar-ubuntu /usr/bin/unrar COPY --from=unrar /usr/bin/unrar-ubuntu /usr/bin/unrar

View file

@ -0,0 +1,10 @@
#!/usr/bin/with-contenv bash
# Bring up WireGuard if not already up
if ! ip link show dev wg0 > /dev/null 2>&1; then
wg-quick up wg0
else
sleep 60
fi
# Exit after running
exit 0

View file

@ -0,0 +1 @@
longrun

View file

@ -1,5 +1,7 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
# Wait for WireGuard to be up
echo "Starting Plex Media Server. . . (you can ignore the libusb_init error)" echo "Starting Plex Media Server. . . (you can ignore the libusb_init error)"
export PLEX_MEDIA_SERVER_INFO_MODEL=$(uname -m) export PLEX_MEDIA_SERVER_INFO_MODEL=$(uname -m)
export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r) export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r)