[lxc-devel] [pylxd/master] Update containers.rst

ilyakimavets on Github lxc-bot at linuxcontainers.org
Mon Apr 2 13:19:58 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 383 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180402/37265d7b/attachment.bin>
-------------- next part --------------
From 4be2757b0d936fdb3b6dd3122c0d8c7603140d08 Mon Sep 17 00:00:00 2001
From: ilyakimavets <il.yakimavets at gmail.com>
Date: Mon, 2 Apr 2018 16:18:12 +0300
Subject: [PATCH] Update containers.rst

---
 doc/source/containers.rst | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/doc/source/containers.rst b/doc/source/containers.rst
index b2e9e3c..57107f4 100644
--- a/doc/source/containers.rst
+++ b/doc/source/containers.rst
@@ -107,24 +107,25 @@ you'll pass `wait=True` as well.
 
 If you were to use an actual image source, you would be able to operate
 on the container, starting, stopping, snapshotting, and deleting the
-container.
+container. You can also modify container config (limits and etc)
 
 .. code-block:: python
 
-    >>> config = {'name': 'my-container', 'source': {'type': 'image', 'alias': 'ubuntu/trusty'}}
+    >>> config = {'name': 'my-container', 'source': {'type': 'image', 'alias': 'ubuntu/trusty'} 'config': {'limits.cpu': '2'}}
     >>> container = client.containers.create(config, wait=True)
     >>> container.start()
     >>> container.freeze()
     >>> container.delete()
 
 
-To modify container's configuration method `save` should be called after
+To modify container's configuration method `
+` should be called after
 :class:`~container.Container` attributes changes.
 
     >>> container = client.containers.get('my-container')
     >>> container.ephemeral = False
     >>> container.devices = { 'root': { 'path': '/', 'type': 'disk', 'size': '7GB'} }
-    >>> container.save
+    >>> container.save()
 
 
 Container Snapshots


More information about the lxc-devel mailing list