|
|
@ -77,8 +77,6 @@ services: |
|
|
|
- myapp //<5> |
|
|
|
#privileged: true |
|
|
|
environment: |
|
|
|
- NODENAME=${NODENAME} |
|
|
|
- NODENETWORK=${NODENETWORK} |
|
|
|
- DISPLAY=\${DISPLAY} //<10> |
|
|
|
#cap_add: |
|
|
|
# - NET_ADMIN //<11> |
|
|
@ -104,4 +102,44 @@ networks: |
|
|
|
<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 |
|
|
|
---- |
|
|
|
|
|
|
|
|
|
|
|