Skip to content

Commit

Permalink
Set LIBPROCESS_IP into docker container.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpark authored and tillt committed May 10, 2017
1 parent fd5d2cf commit d39453d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/docker/docker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,11 @@ Future<Option<int>> Docker::run(
environmentVariables["MESOS_SANDBOX"] = mappedDirectory;
environmentVariables["MESOS_CONTAINER_NAME"] = name;

Option<string> libprocessIP = os::getenv("LIBPROCESS_IP");
if (libprocessIP.isSome()) {
environmentVariables["LIBPROCESS_IP"] = libprocessIP.get();
}

foreachpair(const string& key, const string& value, environmentVariables) {
argv.push_back("-e");
argv.push_back(key + "=" + value);
Expand Down

0 comments on commit d39453d

Please sign in to comment.