Coder Social home page Coder Social logo

docker-pivpn's Introduction

PiVPN Docker

A simple docker container that sets up PiVPN.

Install and Config

Type in:

curl -L https://bit.ly/2CzLV3T -o setup.sh
sudo bash setup.sh

For most use cases, you just need to press enter all the way through your prompts.

Usage: setup.sh <options>
Options:
   -h --help                Show help
   -b --build               Builds dockerfile
   -c --config <amount>     Specify the amount of client configs you want
   -r --rand <amount>       Specify the amount of random data (100's of bytes) that you want your Docker container to be seeded with

Note: Usage on ARM is not fully supported yet, although feel free to help out in this area. Also, PiVPN over TCP is not supported.

Credits & Contributions

Visit PiVPN's GitHub at https://github.com/pivpn/pivpn.

Contributions are always welcome! Just submit a pull request, and I'll review it. Please note that newest features are on the devel branch.

docker-pivpn's People

Contributors

innovativeinventor avatar maxfan8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-pivpn's Issues

Can you add a docker-compose file?

Iโ€™d like to have all of the config files saved to my hosts file system so if I kill the container and recreate it, then there is no need to run any scripts again because the existing files will already be in place. I see your script copies files to the host, but there is no easy way of getting them back into the container. If you create a docker-compose file with these mounts specified that would be extremely helpful.

pivpn -a nopass and tcp/udp

Hello!
Great container thanks!
It would be great if a feature could be added to allow nopass to be added in the setup.sh

Also when i run the setup.sh it always makes 1194 tcp instead of udp. should it be doing that?

Thanks
Sam

Does not build ! Wrong docker build command and file/folder existence checks

I tried the setup script but I could not build the Dockerfile.

*) The build command is wrong: docker build -t innovativeinventor/docker-pivpn:$tag $tag/Dockerfile
it should be docker build -f $tag/Dockerfile -t innovativeinventor/docker-pivpn:$tag .

*) The checks for the existence of Dockerfile and setup_repo() { if [ -e docker-pivpn are in wrong folders, also the git clone.
I can try to fake that with creating a Dockerfile in the setup.sh folder and a docker-pivpn folder inside.

*) install.sh is called 2 times !

*) the sed --> Default.txt fails, that file is not in that folder

Why does the container generate certificates each time it runs?

I'm not sure I understand the purpose of this container. Is this for temporary "one-off" vpn access? Anytime I execute a command, such as

sudo bash setup.sh -n

The container generates an entirely new server certificate. Ideally I'd only have to do that once and be able to use pivpn like I normally would with a non-container installation.

Docker image not found

Hi,

thank you for this awesome docker container! I tried to run it on my Raspberry Pi 3 this morning and I saw the following error:

pi@raspberrypi:~ $ curl -L https://bit.ly/2CzLV3T -o setup.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   168  100   168    0     0    308      0 --:--:-- --:--:-- --:--:--   308
100  5982  100  5982    0     0   7250      0 --:--:-- --:--:-- --:--:--  7250
pi@raspberrypi:~ $ sudo bash setup.sh
Error response from daemon: manifest for innovativeinventor/docker-pivpn:armhf not found
Unable to find image 'innovativeinventor/docker-pivpn:armhf' locally
docker: Error response from daemon: manifest for innovativeinventor/docker-pivpn:armhf not found.
See 'docker run --help'.

Cloning into 'docker-pivpn'...
remote: Counting objects: 11, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 11 (delta 2), reused 4 (delta 0), pack-reused 0
Unpacking objects: 100% (11/11), done.
must specify at least one container source
setup.sh: line 201: warning: command substitution: ignored null byte in input
Error: No such container: bash
Error: No such container: bash
Error: No such container: dpkg
Error: No such container: bash
Restarting container . . .
"docker restart" requires at least 1 argument.
See 'docker restart --help'.

Usage:  docker restart [OPTIONS] CONTAINER [CONTAINER...] [flags]

Restart one or more containers
Error: No such container: 
Your port is
Error: No such container: sed
Generating configs . . . Please answer the prompts
Error: No such container: pivpn
must specify at least one container source
Done! To execute commands, type docker exec -it  /bin/bash
All currently generated configs are in the ovpns directory
To generate more configs, just type docker exec -it  pivpn -a
Your openvpn port should be , open it up if you are using a firewall

Am I doing something wrong?

Thank you very much for your help.
Chris

Error response from daemon: Container [id] is not running after entering PiVPN user password

I am running the bash script on a clean install of Raspbian Stretch using Docker. For some reason it says the container is not running. When I run docker ps there is no container running. I am fairly new to Docker so perhaps I am doing something wrong, but it is not clear to me if simply running your script and having Docker installed was all I needed to do. Thanks!

Missing binaries and hanging setup on HypriotOS

Hi!

First of all: Great work!

I was using pivpn for a while. Now i want to move my complete rpi infrastructure to docker. Iam a big fan of HypriotOS for rpi. (https://blog.hypriot.com/downloads/) This os allows me to run docker out of the box on my rpi. Currently iam using HypriotOS (Debian GNU/Linux 8)

Unfornatelly it does not work with your install script (curl -s -L https://bit.ly/2vpfRx9 | sudo bash).

The first thing is: hypriot is very minimalistic. For example i have to install lsof befor using your script by using "apt-get install lsof". It would be nice if your script could check if the binary exists.

The second thing is: the script seems to be hanging after i have typed in the port number.

If i have the time i will provide you more informations about the issue. But i have no idea where and how to start the debugging. Iam not so experienced in writing complex sh-scripts.

Not getting prompted

Just seen this has been updated and thought i'd give it a go.

The container is made but during setup it doesn't run through the pivpn setup bit anymore and gets these errors. Doesn't mean much to me but hopefully this helps

sudo bash setup.sh
Cloning into 'docker-pivpn'...
remote: Counting objects: 11, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 11 (delta 2), reused 1 (delta 0), pack-reused 0
Unpacking objects: 100% (11/11), done.
amd64: Pulling from innovativeinventor/docker-pivpn
Digest: sha256:bd4019dc664eec9e4e55373648da785ec328be20eb11d2078eb563a90bc26e7a
Status: Image is up to date for innovativeinventor/docker-pivpn:amd64
5c347f7ae81e758e6241734a0807f883ad95c02f30b84fdf3a077b6cd67976d2
setup.sh: line 200: warning: command substitution: ignored null byte in input
:::
::: You are root.
::: Verifying free disk space...
:::
::: Checking apt-get for upgraded packages.... done!
:::
::: Your system is up to date! Continuing with PiVPN installation...
:::
::: You are root.
::: Verifying free disk space...
:::
::: Checking apt-get for upgraded packages.... done!
:::
::: Your system is up to date! Continuing with PiVPN installation...
Restarting container . . .
5c347f7ae81e758e6241734a0807f883ad95c02f30b84fdf3a077b6cd67976d2
Your port is 32779
sed: can't read /etc/openvpn/easy-rsa/pki/Default.txt: No such file or directory
Generating configs . . . Please answer the prompts
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: "pivpn": executable file not found in $PATH": unknown
Error response from daemon: Could not find the file /home/pivpn/ovpns in container 5c347f7ae81e758e6241734a0807f883ad95c02f30b84fdf3a077b6cd67976d2
Done! To execute commands, type docker exec -it 5c347f7ae81e758e6241734a0807f883ad95c02f30b84fdf3a077b6cd67976d2 /bin/bash
All currently generated configs are in the ovpns directory
To generate more configs, just type docker exec -it 5c347f7ae81e758e6241734a0807f883ad95c02f30b84fdf3a077b6cd67976d2 pivpn -a
Your openvpn port should be 32779, open it up if you are using a firewall

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.