diff --git a/portainer/app/executor.py b/portainer/app/executor.py index ca489c4..6b1cf06 100644 --- a/portainer/app/executor.py +++ b/portainer/app/executor.py @@ -69,7 +69,12 @@ def registered(self, driver, executorInfo, frameworkInfo, slaveInfo): def launch_docker_daemon(): logger.info("Launching docker daemon subprocess") - # TODO(tarnfeld): This should be made a little more flexible + env = dict(os.environ) + env["DOCKER_DAEMON_ARGS"] = "-g %s" % ( + os.path.join(env["MESOS_DIRECTORY"], "docker") + ) + + # Use the `wrapdocker` script included in our docker image proc = subprocess.Popen(["/usr/local/bin/wrapdocker"]) self.docker = docker.Client() diff --git a/portainer/app/scheduler.py b/portainer/app/scheduler.py index 30e5f27..e2d3163 100644 --- a/portainer/app/scheduler.py +++ b/portainer/app/scheduler.py @@ -349,7 +349,6 @@ def handle_exception(e): # TODO(tarnfeld): Support the mesos 0.20.0 docker protobuf too task.executor.command.container.image = "docker://%s" % (self.container_image) task.executor.command.container.options.extend(["--privileged"]) - task.executor.command.container.options.extend(["-v", "$MESOS_DIRECTORY/docker:/var/lib/docker"]) task.executor.name = "build" task.executor.source = "build %s" % (task.name)