diff options
| author | Joey Hess <joey@kitenet.net> | 2014-10-10 11:36:47 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-10-10 11:36:47 -0400 |
| commit | 07f745ef9ca23982d7ef7e89bd6a638077a65ded (patch) | |
| tree | 9acc6ddda92f98d4c951045d4dcf406207c809ba /src/Propellor/Property/Docker.hs | |
| parent | 2028464268c9e4696c59ee6626a9e315c88ad935 (diff) | |
| parent | 31f84270fddbf07221a6c1ea30e7a8c05db29115 (diff) | |
Merge branch 'joeyconfig'
Conflicts:
debian/changelog
privdata/privdata.gpg
Diffstat (limited to 'src/Propellor/Property/Docker.hs')
| -rw-r--r-- | src/Propellor/Property/Docker.hs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs index 4307b850..f441197e 100644 --- a/src/Propellor/Property/Docker.hs +++ b/src/Propellor/Property/Docker.hs @@ -13,6 +13,7 @@ module Propellor.Property.Docker ( docked, memoryLimited, garbageCollected, + tweaked, Image, ContainerName, -- * Container configuration @@ -102,7 +103,7 @@ docked hosts cn = RevertableProperty where go desc a = property (desc ++ " " ++ cn) $ do hn <- asks hostName - let cid = ContainerId hn cn + let cid = ContainerId hn cn ensureProperties [findContainer mhost cid cn $ a cid] mhost = findHost hosts (cn2hn cn) @@ -152,7 +153,7 @@ mkContainer cid@(ContainerId hn _cn) h = Container <*> pure (map (\a -> a hn) (_dockerRunParams info)) where info = _dockerinfo $ hostInfo h' - h' = h + h' = h -- expose propellor directory inside the container & volume (localdir++":"++localdir) -- name the container in a predictable way so we @@ -176,6 +177,16 @@ garbageCollected = propertyList "docker garbage collected" gcimages = property "docker images garbage collected" $ do liftIO $ report <$> (mapM removeImage =<< listImages) +-- | Tweaks a container to work well with docker. +-- +-- Currently, this consists of making pam_loginuid lines optional in +-- the pam config, to work around https://github.com/docker/docker/issues/5663 +-- which affects docker 1.2.0. +tweaked :: Property +tweaked = trivial $ + cmdProperty "sh" ["-c", "sed -ri 's/^session\\s+required\\s+pam_loginuid.so$/session optional pam_loginuid.so/' /etc/pam.d/*"] + `describe` "tweaked for docker" + -- | Configures the kernel to respect docker memory limits. -- -- This assumes the system boots using grub 2. And that you don't need any |
