7.9 use of docker secret in stack

Time:2021-10-16

docker-compose.yml

version: '3.6'
services:
  mysql:
    image: mysql
    secrets:
      - login-password
    environment:
      MYSQL_ROOT_PASSWORD_FILE: /run/secrets/login-password

secrets:
  login-password:
    external: true

deploy

docker stack deploy -c=docker-compose.yml mysql-secret

Recommended Today

Swift advanced (XV) extension

The extension in swift is somewhat similar to the category in OC Extension can beenumeration、structural morphology、class、agreementAdd new features□ you can add methods, calculation attributes, subscripts, (convenient) initializers, nested types, protocols, etc What extensions can’t do:□ original functions cannot be overwritten□ you cannot add storage attributes or add attribute observers to existing attributes□ cannot add parent […]