propellor spin

This commit is contained in:
Joey Hess 2014-09-18 23:50:13 -04:00
parent f0409ae869
commit fc95968145
Failed to extract signature
2 changed files with 12 additions and 0 deletions

View File

@ -362,6 +362,7 @@ standardContainer name suite arch = Docker.container name (dockerImage system)
& Apt.installed ["systemd"] & Apt.installed ["systemd"]
& Apt.unattendedUpgrades & Apt.unattendedUpgrades
& Apt.cacheCleaned & Apt.cacheCleaned
& Docker.tweaked
where where
system = System (Debian suite) arch system = System (Debian suite) arch

View File

@ -13,6 +13,7 @@ module Propellor.Property.Docker (
docked, docked,
memoryLimited, memoryLimited,
garbageCollected, garbageCollected,
tweaked,
Image, Image,
ContainerName, ContainerName,
-- * Container configuration -- * Container configuration
@ -176,6 +177,16 @@ garbageCollected = propertyList "docker garbage collected"
gcimages = property "docker images garbage collected" $ do gcimages = property "docker images garbage collected" $ do
liftIO $ report <$> (mapM removeImage =<< listImages) 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. -- | Configures the kernel to respect docker memory limits.
-- --
-- This assumes the system boots using grub 2. And that you don't need any -- This assumes the system boots using grub 2. And that you don't need any