From dd9c49f89c2c080c248a8ec492f42b9310c8efb9 Mon Sep 17 00:00:00 2001 From: zeus Date: Fri, 4 Mar 2022 16:06:38 +0200 Subject: [PATCH] add cloud info --- .../modules/ROOT/pages/docker-compose.adoc | 42 ++++++++++++++++++- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/CloudComputing_Lab/modules/ROOT/pages/docker-compose.adoc b/CloudComputing_Lab/modules/ROOT/pages/docker-compose.adoc index c09cab4..524d4f1 100644 --- a/CloudComputing_Lab/modules/ROOT/pages/docker-compose.adoc +++ b/CloudComputing_Lab/modules/ROOT/pages/docker-compose.adoc @@ -77,8 +77,6 @@ services: - myapp //<5> #privileged: true environment: - - NODENAME=${NODENAME} - - NODENETWORK=${NODENETWORK} - DISPLAY=\${DISPLAY} //<10> #cap_add: # - NET_ADMIN //<11> @@ -103,5 +101,45 @@ networks: <10> X app <11> use host net + +== start service + +=== docker-compose + +.Docker-compose +[source,bash] +---- +env MYPASSWORD=v9ptvq4dedcrtcrykjcubk28j \ +docker-compose -f file.yml up +---- + +=== docker swarm + +.Docker swarm +[source,bash] +---- +env PASSWORD=K507R1zQ6Jifc9MAW3 \ +docker stack deploy -c file.yml ondemand_os2 +---- + + +== stop service + +=== docker-compose + +.Docker-compose +[source,bash] +---- +docker-compose -f file.yml down +---- + +=== docker swarm + +.Docker swarm +[source,bash] +---- +docker service rm ondemand_os2_myapp +docker service rm ondemand_os2_wyweb +----