🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
### 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 ```