Skip to content

Commit

Permalink
chore: variabl names
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Oct 3, 2024
1 parent 9866440 commit 0e4d881
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docker-host/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ const EnvOverrideHost = "DOCKER_HOST"

var dockerHost = machineryvars.GetEnv("DOCKER_HOST", "docker-host")
var repositoriesToUpdate = machineryvars.GetEnv("REPOSITORIES_TO_UPDATE", "uselagoon")
var REGISTRY = machineryvars.GetEnv("REGISTRY", "docker-registry.default.svc:5000")
var BIP = machineryvars.GetEnv("BIP", "172.16.0.1/16")
var registry = machineryvars.GetEnv("REGISTRY", "docker-registry.default.svc:5000")
var bip = machineryvars.GetEnv("BIP", "172.16.0.1/16")
var logLevel = machineryvars.GetEnv("LOG_LEVEL", "info")
var REGISTRY_MIRROR = machineryvars.GetEnv("REGISTRY_MIRROR", "")
var registryMirror = machineryvars.GetEnv("REGISTRY_MIRROR", "")
var pruneImagesSchedule = machineryvars.GetEnv("PRUNE_SCHEDULE", "22 1 * * *")
var pruneDanglingSchedule = machineryvars.GetEnv("PRUNE_DANGLING_SCHEDULE", "22 1 * * *")
var pruneBuilderCacheSchedule = machineryvars.GetEnv("PRUNE_BUILDER_CACHE_SCHEDULE", "22 1 * * *")
Expand All @@ -44,12 +44,12 @@ func main() {
}
defer cli.Close()

var command = fmt.Sprintf("/usr/local/bin/dind /usr/local/bin/dockerd --host=tcp://0.0.0.0:2375 --host=unix:///var/run/docker.sock --bip=%s --storage-driver=overlay2 --tls=false --log-level=%s", BIP, logLevel)
if REGISTRY != "" {
command = command + fmt.Sprintf(" --insecure-registry=%s", REGISTRY)
var command = fmt.Sprintf("/usr/local/bin/dind /usr/local/bin/dockerd --host=tcp://0.0.0.0:2375 --host=unix:///var/run/docker.sock --bip=%s --storage-driver=overlay2 --tls=false --log-level=%s", bip, logLevel)
if registry != "" {
command = command + fmt.Sprintf(" --insecure-registry=%s", registry)
}
if REGISTRY_MIRROR != "" {
command = command + fmt.Sprintf(" --registry-mirror=%s", REGISTRY_MIRROR)
if registryMirror != "" {
command = command + fmt.Sprintf(" --registry-mirror=%s", registryMirror)
}
var cmd = exec.Command("sh", "-c", command)

Expand Down

0 comments on commit 0e4d881

Please sign in to comment.