A nordvpn subscription is not required to reproduce this problem.
Problem: Docker container does not find System Daemon of nordvpn after restart
Steps:
1 - Build (Dockerfile below) docker container with docker build -t nordvpn .
2 - Create and run container docker run -it --name nordvpn nordvpn
3 - Type nordvpn status to see the connection status (nordvpn is running and working here)
4 - Exit container and start it again docker start -ia nordvpn
5 - Type nordvpn status to see the error: Cannot reach System Daemon.
What I expected to happen: The container starts normally and connects to the VPN
What happens: Cannot reach System Daemon
Dockerfile:
FROM ubuntu:22.04
RUN apt-get update && \
apt-get install -y transmission-daemon && \
apt-get install -y wget iputils-ping curl && \
wget -O /tmp/nordrepo.deb https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/nordvpn-release_1.0.0_all.deb && \
apt-get install -y /tmp/nordrepo.deb && \
apt-get update && \
apt-get install -y nordvpn=3.17.1 && \
apt-get remove -y wget nordvpn-release && \
rm /tmp/nordrepo.deb && \
apt-get clean
RUN ulimit -l unlimited
ENTRYPOINT /etc/init.d/nordvpn start && sleep 5 && /bin/bash -c "$@"
CMD bash
Any ideas of workarounds? I've tried to run with --privileged and --cap-add=NET_ADMIN, but no luck.