hocker-1.0.5: Interact with the docker registry and generate nix build instructions

Copyright(C) 2016 Awake Networks
LicenseApache-2.0
MaintainerAwake Networks <opensource@awakenetworks.com>
Stabilitystable
Safe HaskellNone
LanguageHaskell2010

Network.Wreq.Docker.Image.Lib

Description

 

Synopsis

Documentation

mapPool #

Arguments

:: Traversable t 
=> Int

Number of pooled worker threads

-> ((String -> IO ()) -> a -> Hocker FilePath)

Processing function

-> t a

A Traversable container

-> Hocker (t (Either HockerException FilePath)) 

Like mapM but concurrently apply a function to the elements of the Traversable, limiting the maximum number of worker threads by _n_.

forPool #

Arguments

:: Traversable t 
=> Int

Number of pooled worker threads

-> t a

A Traversable container

-> ((String -> IO ()) -> a -> Hocker FilePath)

Processing function

-> Hocker (t (Either HockerException FilePath)) 

Like mapPool but with the arguments flipped.

fetchLayer #

Arguments

:: (String -> IO ())

Concurrent terminal output function

-> (RefLayer, Layer)

A tuple of the reference layer hash digest from the image's config JSON and hash digest from the image's manifest JSON

-> Hocker FilePath 

Download, verify, decompress, and write a docker container image layer to the filesystem.

createImageManifest #

Arguments

:: RepoTag

e.g: registry.mydomain.net:5001reponameimagename

-> FilePath

Path of image config file for manifest

-> [RefLayer]

Layer hash digests sourced from the image's config JSON

-> Hocker () 

Generate a manifest.json file.

createImageRepository #

Arguments

:: RepoTag

e.g: registry.mydomain.net:5001reponameimagename

-> [RefLayer]

Layer hash digests sourced from the image's configuration JSON

-> Hocker () 

Generate a repositories json file.

NB: it is JSON but Docker doesn't want it a .json extension unlike its sibling the manifest.json file.

createImageTar :: Hocker FilePath #

Tar and gzip the output dir into the final docker image archive and remove the output dir.