Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Converting Your Dev Environment to a Docker Stack - Cascadia

86 views

Published on

Heard a lot about docker but not sure where to start? In this presentation we will go over the simplest ways to convert your development environment over to a docker stack, including support for full acceptance testing with Selenium. We’ll then go over how to modify the stack to mimic your production/pre-production environment(s) as closely as possible, and demystify working with the containers in the stack.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Converting Your Dev Environment to a Docker Stack - Cascadia

  1. 1. Converting Your Dev Environment to a Docker Stack Dana Luther https://joind.in/talk/3d360 https://git.io/Je3qd @danaluther
  2. 2. Consolidated Work Stack PHP 7.0 FPM NGINX MySQL
  3. 3. Consolidated Work Stack Friend A PHP 5.6 Apache MySQL PHP 7.0 FPM NGINX MySQL
  4. 4. Consolidated Work Stack Friend A PHP 5.6 Apache MySQL Cause B PHP 7.1 FPM NGINX MySQL PHP 7.0 FPM NGINX MySQL
  5. 5. Licensed Application
  6. 6. Licensed Application PHP 5.6 Apache MySQL 5.3 Client A
  7. 7. Licensed Application PHP 5.6 Apache MySQL 5.3 Client A Client B PHP 7.1 Apache MySQL 5.4
  8. 8. Licensed Application Client C PHP 5.6 FPM NGINX MySQL 5.2 PHP 5.6 Apache MySQL 5.3 Client A Client B PHP 7.1 Apache MySQL 5.4
  9. 9. Licensed Application Client D PHP 7.1 FPM NGINX MySQL 5.3 Client C PHP 5.6 FPM NGINX MySQL 5.2 PHP 5.6 Apache MySQL 5.3 Client A Client B PHP 7.1 Apache MySQL 5.4
  10. 10. THERE IS A BETTER WAY
  11. 11. THERE IS A BETTER WAY
  12. 12. VM PHP 7.0 FPM NGINX MySQL
  13. 13. VM PHP 7.0 FPM NGINX MySQL
  14. 14. So, how does that work??? 🤔 ? ? ? ?
  15. 15. docker-compose.yml Docker Compose Version Services in the Stack Configurations, Secrets, Storage Volumes, etc. Version: “3.7” services: nginx: image: nginx command: [ 'sh', '-c', "exec nginx -g 'daemon off;'" ] … php: image: php:7.2-fpm … network: web_frontend config: nginx.conf: file: ./nginx/nginx.conf volumes: …https://docs.docker.com/compose/compose-file/
  16. 16. SIDEBAR:The Docker Hierarchy
  17. 17. SIDEBAR:The Docker Hierarchy Image Container Service Stack
  18. 18. SIDEBAR:The Docker Hierarchy Image Container Service Stack Node Swarm
  19. 19. > docker stack deploy … Swarm NODE 1 NODE 2 ETC. PHP 1 MySQL NGINX PHP 2
  20. 20. SIDEBAR:Docker Command Syntax docker (object) (action) (args)
  21. 21. SIDEBAR:Docker Command Syntax docker (object) (action) (args) > docker container ls
  22. 22. SIDEBAR:Docker Command Syntax docker (object) (action) (args) > docker container ls > docker image ls
  23. 23. SIDEBAR:Docker Command Syntax docker (object) (action) (args) > docker container ls > docker image ls > docker service ls
  24. 24. SIDEBAR:Docker Command Syntax docker (object) (action) (args) > docker container ls > docker image ls > docker service ls > docker volume ls
  25. 25. SIDEBAR:Docker Command Syntax docker (object) (action) (args) > docker container ls > docker image ls > docker service ls > docker volume ls image container stack service config network node plugin swarm Objects
  26. 26. SIDEBAR:Docker Command Syntax docker (object) (action) (args) > docker container ls > docker image ls > docker service ls > docker volume ls image container stack service config network node plugin swarm Objects ls ps prune inspect create remove / rm Common Actions
  27. 27. The swarm … Node Manager Node Worker Node Worker Node Worker
  28. 28. Node Manager A SWARM OF ONE > docker swarm init
  29. 29. Node Manager A SWARM OF ONE > docker swarm init
  30. 30. ⚠ Common “Gotcha” Swarm init — ONE TIME ONLY * THE SWARM PERSISTS *
  31. 31. ⚠ Common “Gotcha” Swarm init — ONE TIME ONLY * THE SWARM PERSISTS * > docker swarm leave
  32. 32. ⚠ Common “Gotcha” Swarm init — ONE TIME ONLY * THE SWARM PERSISTS * > docker swarm leave > docker swarm leave —force
  33. 33. POPQUIZ!
  34. 34. POPQUIZ! A. What’s the difference between a container and a service?
  35. 35. POPQUIZ! A. What’s the difference between a container and a service? B. What’s the difference between a service and a stack?
  36. 36. Commonly Useful Images: mysql php nginx httpd node redis wordpress composer memcached alpine postgres busybox https://store.docker.com
  37. 37. Commonly Useful Images: mysql php nginx httpd node redis wordpress composer memcached alpine postgres busybox phpmyadmin/phpmyadmin https://store.docker.com
  38. 38. Commonly Useful Images: mysql php nginx httpd node redis wordpress composer memcached alpine postgres busybox phpmyadmin/phpmyadmin https://store.docker.com BONUS POP QUIZ!
  39. 39. Commonly Useful Images: mysql php nginx httpd node redis wordpress composer memcached alpine postgres busybox phpmyadmin/phpmyadmin https://store.docker.com BONUS POP QUIZ! How do you pull an image manually?
  40. 40. Commonly Useful Images: mysql php nginx httpd node redis wordpress composer memcached alpine postgres busybox phpmyadmin/phpmyadmin https://store.docker.com > docker image pull mysql:latest BONUS POP QUIZ! How do you pull an image manually?
  41. 41. Images for Automated Testing selenium/standalone-chrome-debug selenium/standalone-firefox-debug:2.53.0 acceptance.suite.yml docker-compose.yml
  42. 42. Images for Automated Testing selenium/standalone-chrome-debug selenium/standalone-firefox-debug:2.53.0 acceptance.suite.yml docker-compose.yml
  43. 43. SIDEBAR:Legacy images, containers, volumes > docker image prune > docker container prune > docker (whatever) prune
  44. 44. SIDEBAR:Legacy images, containers, volumes > docker image prune > docker container prune > docker (whatever) prune > docker system prune
  45. 45. SIDEBAR:Legacy images, containers, volumes > docker image prune > docker container prune > docker (whatever) prune > docker system prune
  46. 46. SIDEBAR:Legacy images, containers, volumes > docker image prune > docker container prune > docker (whatever) prune > docker system prune
  47. 47. SIDEBAR:Legacy images, containers, volumes > docker image prune > docker container prune > docker (whatever) prune > docker system prune
  48. 48. version: “3.7” services: nginx: image: nginx networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “Nginx Service” volumes: - ./public_html:/var/ www/html configs: - source: mysite target: /etc/nginx/conf.d/mysite.conf ports: - “80:80” - “443:443” depends_on: - php - db labels: com.envisageinternational.desc: “Nginx Container” command: [‘sh’,'-c',"exec nginx -g 'daemon off;’”] db: image: mysql ports: - “3306:3306” networks: - web secrets: - db_pwd deploy: replicas: 1 restart_policy: condition: on-failure placement: constraints: [ node.role == manager ] environment: - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_pwd php: image: php:7.0-fpm networks: - web depends_on: - db deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-FPM Service” ports: - “9000:9000” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-FPM Container” php-cli: image: php:7.0-cli networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-CLI Service” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-CLI Container” command: [‘bin/sh’, ‘-c’, “sleep infinity”] networks: web: configs: mysite: file: ./mysite.conf secrets: db_pwd: file: ./root_db_password.txt PHP 7.0 FPM NGINX MySQL
  49. 49. php: image: php:7.0-fpm networks: - web depends_on: - db deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-FPM Service” ports: - “9000:9000” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-FPM Container” php-cli: image: php:7.0-cli networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-CLI Service” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-CLI Container” command: [‘bin/sh’, ‘-c’, “sleep infinity”] networks: web: configs: mysite: file: ./mysite.conf secrets: db_pwd: file: ./root_db_password.txt version: “3.7” services: nginx: image: nginx networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “Nginx Service” volumes: - ./public_html:/var/ www/html configs: - source: mysite target: /etc/nginx/conf.d/mysite.conf ports: - “80:80” - “443:443” depends_on: - php - db labels: com.envisageinternational.desc: “Nginx Container” command: [‘sh’,'-c',"exec nginx -g 'daemon off;’”] db: image: mysql ports: - “3306:3306” networks: - web secrets: - db_pwd deploy: replicas: 1 restart_policy: condition: on-failure placement: constraints: [ node.role == manager ] environment: - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_pwd PHP 7.0 FPM NGINX MySQL
  50. 50. php: image: php:7.0-fpm networks: - web depends_on: - db deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-FPM Service” ports: - “9000:9000” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-FPM Container” php-cli: image: php:7.0-cli networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-CLI Service” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-CLI Container” command: [‘bin/sh’, ‘-c’, “sleep infinity”] networks: web: configs: mysite: file: ./mysite.conf secrets: db_pwd: file: ./root_db_password.txt nginx: image: nginx networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “Nginx Service” volumes: - ./public_html:/var/ www/html configs: - source: mysite target: /etc/nginx/conf.d/mysite.conf ports: - “80:80” - “443:443” depends_on: - php - db labels: com.envisageinternational.desc: “Nginx Container” command: [‘sh’,'-c',"exec nginx -g 'daemon off;’”] PHP 7.0 FPM NGINX MySQL
  51. 51. php: image: php:7.0-fpm networks: - web depends_on: - db deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-FPM Service” ports: - “9000:9000” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-FPM Container” php-cli: image: php:7.0-cli networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-CLI Service” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-CLI Container” command: [‘bin/sh’, ‘-c’, “sleep infinity”] networks: web: configs: mysite: file: ./mysite.conf secrets: db_pwd: file: ./root_db_password.txt nginx: image: nginx networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “Nginx Service” volumes: - ./public_html:/var/ www/html configs: - source: mysite target: /etc/nginx/conf.d/mysite.conf ports: - “80:80” - “443:443” depends_on: - php - db labels: com.envisageinternational.desc: “Nginx Container” command: [‘sh’,'-c',"exec nginx -g 'daemon off;’”] PHP 7.0 FPM NGINX MySQL
  52. 52. SIDEBAR:LABELS — use them everywhere! 🤔 ? ? ? ? The -f toggle -f name=vm_php -f label=com.envisage.desc=php
  53. 53. SIDEBAR:LABELS — use them everywhere! 🤔 ? ? ? ? The -f toggle -f name=vm_php -f label=com.envisage.desc=php
  54. 54. SIDEBAR:LABELS — use them everywhere! 🤔 ? ? ? ? The -f toggle -f name=vm_php -f label=com.envisage.desc=php
  55. 55. SIDEBAR:LABELS — use them everywhere! 🤔 ? ? ? ? The -f toggle -f name=vm_php -f label=com.envisage.desc=php
  56. 56. version: “3.7” services: nginx: image: nginx networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “Nginx Service” volumes: - ./public_html:/var/ www/html configs: - source: mysite target: /etc/nginx/conf.d/mysite.conf ports: - “80:80” - “443:443” depends_on: - php - db labels: com.envisageinternational.desc: “Nginx Container” command: [‘sh’,'-c',"exec nginx -g 'daemon off;’”] db: image: mysql ports: - “3306:3306” networks: - web secrets: - db_pwd deploy: replicas: 1 restart_policy: condition: on-failure placement: constraints: [ node.role == manager ] environment: - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_pwd php: image: php:7.0-fpm networks: - web depends_on: - db deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-FPM Service” ports: - “9000:9000” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-FPM Container” php-cli: image: php:7.0-cli networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-CLI Service” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-CLI Container” command: [‘bin/sh’, ‘-c’, “sleep infinity”] networks: web: configs: mysite: file: ./mysite.conf secrets: db_pwd: file: ./root_db_password.txt PHP 7.0 FPM NGINX MySQL
  57. 57. Volume Example for php php: volumes: - ./public_html:/var/ www/html Local path relative to the file Path location within the container
  58. 58. Using named storage volumes Volumes: pub_html: external: true … php: volumes: - pub_html:/var/ www/html Volume name Path location within the container > docker volume create pub_html —opt type=none —opt o=bind —opt device=/Volumes/E/site/ —label “com.envisage.desc=Site”
  59. 59. Using named storage volumes > docker volume create pub_html —opt type=none —opt o=bind —opt device=/Volumes/E/site/ —label “com.envisage.desc=Site”
  60. 60. ⚠ Common “Gotcha” * BEWARE WINDOWS PATHS * C:DockerDriveSite /C/DockerDrives/Site /host_mnt/c/DockerDrives/Site //c/DockerDrives/Site Windows LCOW Volume Path
  61. 61. POPQUIZ!
  62. 62. POPQUIZ! A. What is the command to initialize a swarm?
  63. 63. POPQUIZ! A. What is the command to initialize a swarm? B. What is the command to deploy a docker stack?
  64. 64. > docker stack deploy -c docker-compose.yml cascadia
  65. 65. > docker stack deploy -c docker-compose.yml cascadia
  66. 66. > docker stack deploy -c docker-compose.yml cascadia 🤔 ? ? ? ?
  67. 67. > docker stack deploy -c docker-compose.yml cascadia 🤔 ? ? ? ? > docker service ls
  68. 68. > docker stack deploy -c docker-compose.yml cascadia 🤔 ? ? ? ? > docker service ls
  69. 69. > docker stack deploy -c docker-compose.yml cascadia 🤔 ? ? ? ? > docker service ls
  70. 70. > docker stack deploy -c docker-compose.yml cascadia 🤔 ? ? ? ? > docker service ls
  71. 71. > docker stack deploy -c docker-compose.yml cascadia 🤔 ? ? ? ? > docker service ls > docker stack ps cascadia
  72. 72. > docker stack deploy -c docker-compose.yml cascadia 🤔 ? ? ? ? > docker service ls > docker stack ps cascadia
  73. 73. > docker service logs cascadia_db
  74. 74. > docker service logs cascadia_db
  75. 75. > docker service logs cascadia_db
  76. 76. > docker service logs cascadia_db
  77. 77. Want to see it in action? > docker service logs cascadia_nginx -f
  78. 78. Want to see it in action? > docker service logs cascadia_nginx -f
  79. 79. Want to see it in action? > docker service logs cascadia_nginx -f
  80. 80. Want to see it in action? > docker service logs cascadia_nginx -f
  81. 81. Want to see it in action? > docker service logs cascadia_nginx -f
  82. 82. ⚠ Common “Gotcha” localhost:3306 db:3306
  83. 83. ⚠ Common “Gotcha” localhost:3306 db:3306 upstream fastcgi { server 127.0.0.1:9000 } upstream fastcgi { server php:9000 }
  84. 84. Ok, great! But … ¯_(ツ)_/¯ My production server has lots of configurations that have been customized… php/conf.d/* my.cnf nginx.conf nginx/conf.d/*
  85. 85. version: “3.7” services: nginx: image: nginx networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “Nginx Service” volumes: - ./public_html:/var/ www/html configs: - source: mysite target: /etc/nginx/conf.d/mysite.conf ports: - “80:80” - “443:443” depends_on: - php - db labels: com.envisageinternational.desc: “Nginx Container” command: [‘sh’,'-c',"exec nginx -g 'daemon off;’”] db: image: mysql ports: - “3306:3306” networks: - web secrets: - db_pwd deploy: replicas: 1 restart_policy: condition: on-failure placement: constraints: [ node.role == manager ] environment: - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_pwd php: image: php:7.0-fpm networks: - web depends_on: - db deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-FPM Service” ports: - “9000:9000” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-FPM Container” php-cli: image: php:7.0-cli networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-CLI Service” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-CLI Container” command: [‘bin/sh’, ‘-c’, “sleep infinity”] networks: web: configs: mysite: file: ./mysite.conf secrets: db_pwd: file: ./root_db_password.txt PHP 7.0 FPM NGINX MySQL
  86. 86. version: “3.7” services: nginx: image: nginx networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “Nginx Service” volumes: - ./public_html:/var/ www/html configs: - source: mysite target: /etc/nginx/conf.d/mysite.conf ports: - “80:80” - “443:443” depends_on: - php - db labels: com.envisageinternational.desc: “Nginx Container” command: [‘sh’,'-c',"exec nginx -g 'daemon off;’”] db: image: mysql ports: - “3306:3306” networks: - web secrets: - db_pwd deploy: replicas: 1 restart_policy: condition: on-failure placement: constraints: [ node.role == manager ] environment: - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_pwd networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.d volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.de command: [‘bin/sh’, ‘-c’, “sleep networks: web: configs: mysite: file: ./mysite.conf secrets: PHP 7.0 FPM NGINX MySQL
  87. 87. Config: mysite
  88. 88. Config: mysite > docker config inspect cascadia_mysite
  89. 89. version: “3.4” services: nginx: image: nginx networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “Nginx Service” volumes: - ./public_html:/var/ www/html configs: - source: mysite target: /etc/nginx/conf.d/mysite.conf ports: - “80:80” - “443:443” depends_on: - php - db labels: com.envisageinternational.desc: “Nginx Container” command: [‘sh’,'-c',"exec nginx -g 'daemon off;’”] db: image: mysql ports: - “3306:3306” networks: - web secrets: - db_pwd deploy: replicas: 1 restart_policy: condition: on-failure placement: constraints: [ node.role == manager ] environment: - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_pwd php: image: php:7.0-fpm networks: - web depends_on: - db deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-FPM Service” ports: - “9000:9000” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-FPM Container” php-cli: image: php:7.0-cli networks: - web deploy: replicas: 1 restart_policy: condition: on-failure labels: com.envisageinternational.desc: “PHP-CLI Service” volumes: - ./public_html:/var/ www/html labels: com.envisageinternational.desc: “PHP-CLI Container” command: [‘bin/sh’, ‘-c’, “sleep infinity”] networks: web: configs: mysite: file: ./mysite.conf secrets: db_pwd: file: ./root_db_password.txt PHP 7.0 FPM NGINX MySQL
  90. 90. Secret: db_pwd
  91. 91. Secret: db_pwd > docker secret inspect cascadia_db_pwd
  92. 92. ⚠ Common “Gotcha” > docker config ls
  93. 93. ⚠ Common “Gotcha” > docker config ls
  94. 94. ⚠ Common “Gotcha” > docker config create mysite.2 ./mysite.conf > docker config ls
  95. 95. ⚠ Common “Gotcha” > docker config create mysite.2 ./mysite.conf > docker config ls
  96. 96. ⚠ Common “Gotcha” > docker config create mysite.2 ./mysite.conf > docker config ls
  97. 97. ⚠ Common “Gotcha” > docker config create mysite.2 ./mysite.conf > docker config ls
  98. 98. ⚠ Common “Gotcha” > docker config create mysite.2 ./mysite.conf > docker config ls > docker service update --config-rm cascadia_mysite --config-add source=mysite.2,target=/etc/nginx/conf.d/default.conf cascadia_nginx
  99. 99. ⚠ Common “Gotcha” > docker config create mysite.2 ./mysite.conf > docker config ls > docker service update --config-rm cascadia_mysite --config-add source=mysite.2,target=/etc/nginx/conf.d/default.conf cascadia_nginx
  100. 100. > docker service rollback cascadia_nginx
  101. 101. > docker service rollback cascadia_nginx
  102. 102. Done with the project for now? > docker stack rm cascadia
  103. 103. Done with the project for now? > docker stack rm cascadia
  104. 104. Done with the project for now? > docker stack rm cascadia
  105. 105. Done with the project for now? > docker stack rm cascadia
  106. 106. POPQUIZ!
  107. 107. POPQUIZ! A. How do you check the replication status of services?
  108. 108. POPQUIZ! A. How do you check the replication status of services? B. How do you check for error messages on the stack?
  109. 109. POPQUIZ! A. How do you check the replication status of services? B. How do you check for error messages on the stack? BONUS POINT
  110. 110. POPQUIZ! A. How do you check the replication status of services? B. How do you check for error messages on the stack? BONUS POINT How do you avoid truncating the error message?
  111. 111. POPQUIZ! A. How do you check the replication status of services? B. How do you check for error messages on the stack? > docker stack ps vm --no-trunc BONUS POINT How do you avoid truncating the error message?
  112. 112. Same project … multiple production targets? docker-compose.yml docker-compose-clientA.yml docker-compose-clientB.yml
  113. 113. Same project … multiple production targets? docker-compose.yml docker-compose-clientA.yml docker-compose-clientB.yml
  114. 114. Same project … multiple production targets? docker-compose.yml docker-compose-clientA.yml docker-compose-clientB.yml
  115. 115. Same project … multiple production targets? docker-compose.yml docker-compose-clientA.yml docker-compose-clientB.yml
  116. 116. POPQUIZ!
  117. 117. POPQUIZ! A. How do you filter a list of docker objects (services, containers, images, etc)
  118. 118. SIDEBAR:The $( ) magic with -q -l -f -q Quiet (ID only) -l Last Updated Only (1 result) -f Filter (you remember this)
  119. 119. SIDEBAR:The $( ) magic with -q -l -f -q Quiet (ID only) -l Last Updated Only (1 result) -f Filter (you remember this) > docker container ls -q -l
  120. 120. SIDEBAR:The $( ) magic with -q -l -f -q Quiet (ID only) -l Last Updated Only (1 result) -f Filter (you remember this) > docker container ls -q -l
  121. 121. SIDEBAR:The $( ) magic with -q -l -f -q Quiet (ID only) -l Last Updated Only (1 result) -f Filter (you remember this) > docker container ls -q -l > docker container exec -it $(docker ps -lq -f name=cascadia_nginx) bash
  122. 122. SIDEBAR:The $( ) magic with -q -l -f -q Quiet (ID only) -l Last Updated Only (1 result) -f Filter (you remember this) > docker container ls -q -l > docker container exec -it $(docker ps -lq -f name=cascadia_nginx) bash
  123. 123. SIDEBAR:The $( ) magic with -q -l -f -q Quiet (ID only) -l Last Updated Only (1 result) -f Filter (you remember this) > docker container ls -q -l > docker container exec -it $(docker ps -lq -f name=cascadia_nginx) bash
  124. 124. Questions?? https://joind.in/talk/3d360 🤔 ? ? ? ? @danaluther https://www.linkedin.com/in/danaluther dluther@envisageinternational.com https://git.io/Je3qd

×