propellor/Propellor/Property/Docker.hs

17 lines
541 B
Haskell
Raw Normal View History

2014-03-31 03:37:54 +00:00
module Propellor.Property.Docker where
2014-03-31 01:01:18 +00:00
2014-03-31 03:55:59 +00:00
import Propellor
2014-03-31 03:37:54 +00:00
import qualified Propellor.Property.File as File
import qualified Propellor.Property.Apt as Apt
2014-03-31 01:01:18 +00:00
2014-03-31 03:37:54 +00:00
{- | Configures docker with an authentication file, so that images can be
2014-03-31 01:01:18 +00:00
- pushed to index.docker.io. -}
configured :: Property
2014-03-31 01:03:42 +00:00
configured = Property "docker configured" go `requires` installed
where
go = withPrivData DockerAuthentication $ \cfg -> ensureProperty $
"/root/.dockercfg" `File.hasContent` (lines cfg)
installed :: Property
installed = Apt.installed ["docker.io"]