Docker build from Dockerfile with more memory

后端 未结 1 1816
情深已故
情深已故 2021-02-02 13:55

How to docker build from Dockerfile with more memory?

This is a different question from this Allow more memory when docker build a Dockerfi

1条回答
  •  太阳男子
    2021-02-02 14:29

    It is not something about order. The Dockerfile must be specified with -f

    docker build -f Dockerfile.cpu -t ibot-cpu -m 4g .
    

    As you can see in the help.

    However, take into account that by default docker does not limit the container memory. It can take the whole free memory.

    As I can see that you are on OSX, which runs docker over a Linux VM. Configure the max memory clicking the whale icon in the task bar. By default is 2G.

    For further information please see my other answer: How to assign more memory to docker container

    0 讨论(0)
提交回复
热议问题