by
0
4
3,393
10
Top 1% !
Popular
Famous
Specified
Popularity: 3634th place
Created
Modified Mar 15, 2015

Published on:

No tags for this snippet yet.
LicenseMIT_X11
SourceGitHub

Start an OpenVPN Container as a systemd managed service under CoreOS

Start an OpenVPN Container as a systemd managed service under CoreOS: 
openvpn.service
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/407394/Start-an-OpenVPN-Container-as-a-systemd-?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
[Unit] Description=OpenVPN After=docker.service Requires=docker.service [Service] TimeoutStartSec=0 Environment="OVPN_DATA=ovpn-data" Environment="OVPN_IMAGE=kylemanna/openvpn" Environment="OVPN_CONTAINER=openvpn_server" ExecStartPre=-/usr/bin/docker stop ${OVPN_CONTAINER} ExecStartPre=-/usr/bin/docker rm ${OVPN_CONTAINER} ExecStartPre=/usr/bin/docker pull ${OVPN_IMAGE} ExecStart=/usr/bin/docker run --name ${OVPN_CONTAINER} \ --volumes-from ${OVPN_DATA} -p 1194:1194/udp \ --cap-add=NET_ADMIN ${OVPN_IMAGE} ExecStop=/usr/bin/docker stop ${OVPN_CONTAINER} [Install] WantedBy=multi-user.target
If you want to be updated about similar snippets, Sign in and follow our Channels