带密码的配置脚本

version: '3.1'
services:
need_pass:
  image: redis
  restart: always
  ports:
   - 6380:6379
  command:
     redis-server --requirepass 123456

不带密码的配置脚本

version: '3.1'
services:
  no_auth:
    image: redis
    restart: always
    ports:
      - 6379:6379
    command:
      redis-server