From 0a7a64445144a3f2f8c8de6cc44029494d8aace9 Mon Sep 17 00:00:00 2001 From: jguin Date: Mon, 26 Feb 2024 21:39:55 -0600 Subject: [PATCH 1/2] Update README.md Updated README.md to add Docker Compose example --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/README.md b/README.md index ec28f16..ceb5d55 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,57 @@ docker run -p 8080:8080 -v '/local/path/to/config':'/home/root/.cyberghost:rw' ``` +OR using Docker Compose +``` +version: '3' +services: + cyberghostvpn: + image: tmcphee/cyberghostvpn + container_name: cyberghostvpn + network_mode: "bridge" + privileged: true + cap_add: + - NET_ADMIN + volumes: + - /local/path/to/config:/home/root/.cyberghost:rw + environment: + - TZ=America/New_York + - ACC=example@gmail.com + - PASS=mypassword + - COUNTRY=US + - NETWORK=192.168.1.0/24 + - WHITELISTPORTS=9090,8080 + ports: + - 9090:9090 + - 8080:8080 + restart: unless-stopped + +``` Other containers can connect to this image by using its network connection. `--net=container:cyberghostvpn` ``` docker run -d --net=container:cyberghostvpn other-container ``` +OR in Docker Compose +`network_mode: container:cyberghostvpn` +``` +services: + other_service: + image: other_service_image + container_name: other_service + network_mode: container:cyberghostvpn +``` + +If using Docker Compose, place all ports needed from other container into the ports section +``` +ports: + - 9090:9090 + - 8080:8080 + - 6000:6000 + - 6881:6881 +``` + Note: If the other containers have exposed ports for example a WEBUI. Forward that port in the cyberghostvpn image, add the port to WHITELISTPORTS environment variable, and set your local LAN using NETWORK environment variable. See [Environment variables](https://github.com/tmcphee/cyberghostvpn#environment-variables) below for details. ## Selecting a country From fa9a109fd505546fbb5169a3bc00b224344ef5ed Mon Sep 17 00:00:00 2001 From: jguin Date: Tue, 27 Feb 2024 20:40:28 -0600 Subject: [PATCH 2/2] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index ceb5d55..5c8161f 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,6 @@ services: - 9090:9090 - 8080:8080 restart: unless-stopped - ``` Other containers can connect to this image by using its network connection.