openVPN inside docker image

Published

I am trying to create a docker image which has a python script that connects to an API through VPN using openVPN, however, I cannot seem to get openVPN to be working.

I my docker file I have

# Install openVPN and get confi files
RUN mkdir /config
ADD ./config/. /config
RUN apt-get install -y openvpn 

# Run openvpn and script
CMD openvpn --config config/fremsyn.ovpn --auth-user-pass config/login.txt --askpass config/password.conf && python3 src/cli/getStatus.py

But I keep getting the error:

ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)

Is there a solution to this problem?

As a side note, I need to run the container as container instance in Azure.

Source: Docker Questions

Published
Categorised as docker, openvpn Tagged ,

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq