Skip to content

How to upgrade memory of the container? #2974

Answered by kenorb
kenorb asked this question in Q&A
Discussion options

You must be logged in to vote

My issue was that memory and swap were limited by the Docker CE Desktop. After changing in the app, the changes in the code worked:

To debug, run molecule --debug create which calls /usr/local/lib/python*/site-packages/molecule_docker/playbooks/create.yml which calls docker_container role (although not all the params are passed through).

Here is the example of molecule/default/molecule.yml:

---
driver:
  name: docker
platforms:
  - command: /lib/systemd/systemd
    dockerfile: ../../../common/molecule/Dockerfile.j2
    image: ubuntu:18.04
    memory: 4G
    memory_swap: 4G
    name: bionic
    privileged: true
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@kenorb
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by kenorb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants