企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
### 1 命令补全 ```sh curl -L -o /etc/bash_completion.d/docker-compose \ https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose # 下次登陆生效 ``` ### 2 资源限制 docker-compose v3版本命令,可以使用deploy来做资源限制,如: ```sh image: flink:1.3.1 deploy: resources: limits: memory: 1G ``` 但是`docker-compose up`命令不支持资源限制参数,提示如下: ```sh ....Compose does not support 'deploy' configuration - use `docker stack deploy` to deploy to a swarm ``` 这个时候可以使用`--compatibility `参数 ```sh --compatibility If set, Compose will attempt to convert keys ``` 命令如下: ```sh ocker-compose --compatibility up -d ```