Change CPU/Memory in Azure Container Instances using Docker Compose

Nico Nazare Vaz 6 Reputation points
2020-11-30T13:42:48.86+00:00

How do I change CPU/Memory of a multi-container group using Docker Compose within Azure Container Instances?

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
757 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Nico Nazare Vaz 6 Reputation points
    2020-12-01T09:12:44.96+00:00

    I have solved this issue within my docker-compose.yaml:

    version: '3'
    services:
      mycontainer:
        image: mycontainerregistry.azurecr.io/mycontainer1
        container_name: mycontainer
        deploy:
          resources:
            limits:
              memory: 4g
    
    1 person found this answer helpful.

  2. whoward-msft 2,771 Reputation points
    2020-12-01T18:44:13.973+00:00

    You can change the resources allocated to your multi-container group in your docker-compose.yaml file under the deployment request. You would want to configure the resource request property. This property must be less than or equal to the resource limit property that you can also set under the deploy tag in the YAML file.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.