-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate VPN service to Docker Compos
- Loading branch information
1 parent
f83191f
commit 41d8d97
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Use a Microsoft-approved image | ||
FROM mcr.microsoft.com/azure-cli:2.61.0 AS base | ||
|
||
# Install OpenVPN | ||
USER root | ||
RUN apk add --no-cache openvpn || tdnf install -y openvpn || dnf install -y openvpn | ||
|
||
ENTRYPOINT openvpn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# ignore everything | ||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: '3.8' | ||
|
||
services: | ||
vpn: | ||
image: vpn:${VERSION} | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.vpn | ||
container_name: vpn | ||
privileged: true | ||
volumes: | ||
- ${PWD}/secrets:/secrets:z | ||
entrypoint: "openvpn" | ||
command: ["/secrets/vpn-eastus.ovpn"] | ||
healthcheck: | ||
test: ["CMD", "pidof", "openvpn"] | ||
start_period: 20s | ||
interval: 20s | ||
timeout: 3s | ||
retries: 3 | ||