about summary refs log tree commit diff
path: root/src/docker.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/docker.go')
-rw-r--r--src/docker.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/docker.go b/src/docker.go
index e3ff19c..adc94fb 100644
--- a/src/docker.go
+++ b/src/docker.go
@@ -20,9 +20,8 @@ const (
 )
 
 var (
-	dockerCtx            context.Context
-	dockerCLI            *client.Client
-	currentVpnRemptePort = 1194
+	dockerCtx context.Context
+	dockerCLI *client.Client
 )
 
 func setupContext() {
@@ -49,9 +48,9 @@ func spawnCompanion(username string, accesscode string) {
 	vpnRemoteAddress := os.Getenv("HOSTNAME")
 
 	// get the vpnRemoteport and increment it
-	vpnRemotePort := currentVpnRemptePort
-	log.Println("vpnRemptePort ", currentVpnRemptePort)
-	currentVpnRemptePort++
+	vpnRemotePort := *currentVpnRemotePort
+	log.Println("vpnRemptePort ", *currentVpnRemotePort)
+	*currentVpnRemotePort++
 
 	log.Println("Generating the container config")