summaryrefslogtreecommitdiff
path: root/Propellor/Property/Docker.hs
blob: 43c78d853ef559a0f8f2947a56ef8b29553157f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Propellor.Property.Docker where

import Propellor
import qualified Propellor.Property.File as File
import qualified Propellor.Property.Apt as Apt

{- | Configures docker with an authentication file, so that images can be
 - pushed to index.docker.io. -}
configured :: Property
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"]