配置多个具有不同内存限制的Docker服务

105 阅读1分钟

Bitbucket Pipelines提供了一个功能,可以让你在Docker服务中配置内存(在这里了解更多)。

我们有相关的高票建议,客户希望配置多个Docker服务,每个服务有不同的内存配置。

这里有一个工作实例,说明如何为多个Docker服务设置内存限制,并根据步骤要求使用适当的服务。

definitions: services: docker: memory: 512 docker-with-more-memory: memory: 2048 type: docker docker-with-large-memory: memory: 5120 type: docker pipelines: custom: pipeline1: - step: services: [docker] script: - echo "Docker service with 512 MB memory" pipeline2: - step: services: [docker-with-more-memory] script: - echo "Docker service with 2048 MB memory" pipeline3: - step: services: [docker-with-large-memory] size: 2x script: - echo "Docker service with 5120 MB memory"

The postConfiguring multiple Docker services with different memory limitsappeared first onBitbucket.