Inspired by https://github.com/kylemanna/docker-openvpn.
I just needed ARM64 support for my Raspberry PI model 4b :)
Alpine Linux + OpenVPN + a bunch of shell scripts (see folder scripts
).
- amd64
- arm64
Docker images available at https://hub.docker.com have tags which correspond to installed versions of OpenVPN. This means that image kozhin/docker-openvpn:2.5.7
has OpenVPN 2.5.7
inside. Versions other packages are expected to be latest to the moment of image creation (see image creation date).
- Latest Docker installed
- Docker Compose available
To use this Docker image some manual configuration is required.
- Copy
docker-compose.example.yaml
to any folder on your host machine, e.g./apps
- Adjust file for your needs and rename it to
docker-compose.yaml
- Run
docker compose up -d
- Run
docker compose stop
- Get Docker volume name using
docker volume ls
and update files inscripts
folder - Run script
install.sh
fromscripts
folder on your host machine and follow instructions on the scteen - Run
docker componse up -d
- (Optional) run script
add_user.sh
fromscripts
folder to create new users
Simply run the following commands from your folder with docker-compose.yaml
file:
docker compose stop
docker compose rm
NOTE: container volumes will be preserved with all data inside. To delete them use docker volume rm %VOLUME NAMES%
. Also you may want to remove networks with docker network rm %NETWORK NAMES%
- Use steps mentioned in
Shutting down
section - Then run
docker compose pull
- And finally
docker compose up -d
NOTE: use docker image prune
to remove unused images. BE CAREFUL! This command may remove other unused images.
MIT