docker-compose 在新版本增加了profile 支持,可以同profile启动compose里面全部/部分docker实例,当出现如下错误
root@ubuntu:~/dolphinscheduler-3.0.0/deploy/docker# docker-compose up
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.dolphinscheduler-alert: 'profiles'
Unsupported config option for services.dolphinscheduler-api: 'profiles'
Unsupported config option for services.dolphinscheduler-master: 'profiles'
Unsupported config option for services.dolphinscheduler-postgresql: 'profiles'
Unsupported config option for services.dolphinscheduler-schema-initializer: 'profiles'
Unsupported config option for services.dolphinscheduler-worker: 'profiles'
Unsupported config option for services.dolphinscheduler-zookeeper: 'profiles'
root@ubuntu:~/dolphinscheduler-3.0.0/deploy/docker# docker-compose -v
需要升级到1.28以上。
可以直接采用以下命令升级,其中“v2.11.0”可以去github查看对应版本url。
升级docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/v2.11.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
然后指定profile 启动
root@ubuntu:~/dolphinscheduler-3.0.0/deploy/docker# docker-compose --profile all up