def node_byo():
token = ""
try:
if dockercloud.namespace:
json = dockercloud.api.http.send_request("POST", "api/infra/%s/%s/token" %
(API_VERSION, dockercloud.namespace))
else:
json = dockercloud.api.http.send_request("POST", "api/infra/%s/token" % API_VERSION)
if json:
token = json.get("token", "")
except Exception as e:
print(e, file=sys.stderr)
sys.exit(EXCEPTION_EXIT_CODE)
print("Docker Cloud lets you use your own servers as nodes to run containers. "
"For this you have to install our agent.")
print("Run the following command on your server:")
print()
print("\tcurl -Ls https://get.cloud.docker.com/ | sudo -H sh -s", token)
print()
评论列表
文章目录