diff --git a/docker/docker.go b/docker/docker.go index 077bfb6..97c10ea 100644 --- a/docker/docker.go +++ b/docker/docker.go @@ -288,7 +288,13 @@ func (d *docker) CreateContainer(opts CreateContainerOpts) error { } } h.Resources.PidsLimit = pidsLimit - h.Resources.Memory = 4092 * Megabyte + + if memLimit := os.Getenv("MAX_MEMORY_MB"); memLimit != "" { + if i, err := strconv.Atoi(memLimit); err == nil { + h.Resources.Memory = int64(i) * Megabyte + } + } + t := true h.Resources.OomKillDisable = &t diff --git a/dockerfiles/dind/Dockerfile.dind-ee b/dockerfiles/dind/Dockerfile.dind-ee index 5c3446e..6453b67 100644 --- a/dockerfiles/dind/Dockerfile.dind-ee +++ b/dockerfiles/dind/Dockerfile.dind-ee @@ -2,7 +2,7 @@ ARG VERSION=franela/docker:17.06.2-dind-ubuntu FROM ${VERSION} RUN apt-get update \ - && apt-get install -y git tmux apache2-utils vim curl zfs jq bash-completion \ + && apt-get install -y git tmux apache2-utils vim curl jq bash-completion \ && rm -rf /var/lib/apt/lists/* diff --git a/dockerfiles/dind/ucp.sh b/dockerfiles/dind/ucp.sh index f18d45b..27537a0 100755 --- a/dockerfiles/dind/ucp.sh +++ b/dockerfiles/dind/ucp.sh @@ -10,12 +10,13 @@ function wait_for_url { } function deploy_ucp { - wait_for_url "http://localhost:2375" + wait_for_url "https://localhost:2376" docker run --rm --name ucp \ -v /var/run/docker.sock:/var/run/docker.sock \ docker/ucp:2.2.3 install --force-insecure-tcp \ --san *.direct.${PWD_HOST_FQDN} \ --license $(cat $HOME/workshop.lic) \ + --swarm-port 2375 \ --admin-username admin \ --admin-password admin1234 }