You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

docker.adoc 665B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. +++
  2. +++
  3. :source-highlighter: pygments
  4. == Docker
  5. === Compose file snippets
  6. ==== General template
  7. [source,yaml]
  8. ----
  9. version: '3.7'
  10. services:
  11. name:
  12. image: x/y:z
  13. volumes:
  14. - host/path:/container/path
  15. - custom:/container/path
  16. environment:
  17. FOO: bar
  18. restart: always
  19. networks:
  20. custom:
  21. external: true
  22. volumes:
  23. custom:
  24. ----
  25. ==== MySQL/MariaDB
  26. [source,yaml]
  27. ----
  28. db:
  29. image: mariadb:latest
  30. volumes:
  31. - mariadb_data:/var/lib/mysql
  32. restart: always
  33. environment:
  34. MYSQL_DATABASE: app_name
  35. MYSQL_USER: app_name
  36. MYSQL_PASSWORD: app_password
  37. MYSQL_ROOT_PASSWORD: random_password
  38. ----