6v      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None"#36;<=>?KQV PwExposedPort represents a port (and it's type) that a container should expose to other containers or the host system. NOTE: This does not automatically expose the port onto the host system but rather it just tags it. It's best to be used with the PublishAllPorts flag. It is also useful for the daemon to know which Environment variables to inject into a container linking to our container. Example linking a Postgres container named db would inject the following environment variables automatically if we set the corresponding ExposedPort: cDB_PORT_5432_TCP_PORT="5432" DB_PORT_5432_TCP_PROTO="tcp" DB_PORT_5432_TCP="tcp://172.17.0.1:5432" nThis datastructure models mapping a Port from the container onto the host system s that the service running in the container can be accessed from the outside world. We either map a port onto all interfaces (default) or onto a specific interface like  `127.0.0.1`. NOTEe: We should disallow duplicate port bindings as the ToJSON instance will only send the last one. {  port/ protocol: [{ HostPort: " port" }] }Used for marking a directory in the container as "exposed" hence taking it outside of the COW filesystem and making it mountable in other containers using  VolumesFrom1. The volume usually get's created somewhere in varlibdockervolumes= (depending on the volume driver used). The CLI example is: }docker run --name app -v /opt/data -it myapp:latest docker run --name app2 --volumes-from app /bin/bash -c "ls -l /opt/data" ;Set permissions on volumes that you mount in the container.Options for creating a networkThe network's name(Check for networks with duplicate names.)Name of the network driver plugin to use.(Restrict external access to the network.Enable IPv6 on the network.ALog options used when requesting the log output from a container.LUsed for requesting N number of lines when tailing a containers log output.Timestamp alias.Image delete opts2Options for when building images from a Dockerfile9Image name in the form of name:tag; ie. myimage:latest.:w(Name of dockerfile (default: Dockerfile))Do not use cache when building the image.GRemove intermediate containers after a successful build (default true).&Always remove intermediate containers.VAlways attempt to pull a newer version of the *parent* image (ie. FROM debian:jessie).!Options for deleting a container.AAutomatically cleanup volumes that the container created as well.8If the container is still running force deletion anyway.!Options for starting a container.aOverride the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- value where  value! is one of: a-z, @, ^, [, , or _.&Options used for creating a Container.DData type for the NetworkingConfig section of the container settingsAlias for endpoint nameAEndpointsConfig is container configuration for a specific networkAlias for Aliases.=Data type used for parsing information from a list of images.Alias for Tags.Container and Image Labels.TAlias for representing a RepoDigest. We could newtype this and add some validation.1Represents the state of the container life cycle.0Data type used for parsing a list of containers.HData type reprsenting the various network settings a container can have. XData type used for parsing the network information of each container when listing them.^Data type used for representing the information of various ports that a contianer may expose.MData type used for represneting the version of the docker engine remote API.$@List options used for filtering the list of container or images.'CClient options used to configure the remote engine we're talking to+JData type used for parsing the container state from a list of containers.8HData type used for parsing the mount information from a container list.V`Signal used for sending to the process running in the container. The default signal is SIGTERM.aDTimeout used for stopping a container. DefaultTimeout is 10 seconds.eID of a contianerfWe should newtype thisgWe should newtype thish#List of Docker Engine API endpointst`Second argument (Bool) is whether to follow which is currently hardcoded to False. See note in  for explanation why.xPEither pull an image from docker hub or imports an image from a tarball (or URL)|<Used for extracting the id of the container from the newtype}WUsed for parsing a Text value into a ContainerID. We apply some basic validation here.~9Used for extracting the id of the image from the newtype.fHelper function used for parsing a Text value into an ImageID. For now just basic validation is used.Default DockerClientOpts' used for talking to the docker engine.Default ListOpts". Doesn't list stopped containers.lHelper function used for dropping the "image" prefix when serializing the Image data type to and from json.NContainer configuration used for creating a container with sensible defaults.7Default host confiratuon used for creating a container.Default create options when creating a container. You only need to specify an image name and the rest is all sensible defaults.(Default options for staring a container.Default options for deleting a container. Most of the time we DON'T want to delete the container's volumes or force delete it if it's running.Sane image deletion defaults!Sensible default for log options.+Sensible defalut for create network options<Used for extracting the id of the container from the newtype/Used for parsing a Text value into a NetworkID.?A helper function to more easily add a bind mount to existing  CreateOpts records.HHelper function for adding a Command to and existing CreateOpts record.Helper function for adding a Link$ to and existing CreateOpts record.Helper function for adding a Volume$ to and existing CreateOpts record.Helper function for adding a  VolumeFrom$ to and existing CreateOpts record.>A convenience function that adds PortBindings to and exiting  CreateOpts record. Useful with  Example:5let pb = PortBinding 80 TCP [HostPort "0.0.0.0" 8000]4addPortBinding pb $ defaultCreateOpts "nginx:latest"Helper function for adding a  ExposedPort$ to and existing CreateOpts record.pHelper function for converting a data type [a] to a json dictionary like so {"something": {}, "something2": {}}xHelper function for converting a data type [a] to a json dictionary like so {"something": "val1", "something2": "val2"}4Helper function that return an empty dictionary "{}"   -!"#$%&'()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`bacdhefgijklmnopqrstuvwxyz{|}~      !#"$%&'()*+,7-./012345689:;<=>?@APNBCDEFGHIJKLMOQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~hijklmnopqrstuvwxyz{gfe|}d~vabc_`VWXYZ[\]^@ABCDEFGHIJKLMNOPQRSTU'()*$%& !"#+,-./01234567~|}wxyz{stu     89:;<=>?nopqrjklmidefgh`abc^_EFGHIJKLMNOPQRSTUVWXYZ[\]@ABCD !"#$%&'()*+,-./01 <=>?89:;234567;  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghjklmnopqrstuvwxyz{|}~          !"#$%&'()*+ ,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdehijklmnopqrstuvwxyz{None 36;<=>?KQVpfghijkfghijkNone 36;<=>?KQVs6Could not parse the response from the Docker endpoint.t0Invalid exit code received from Docker endpoint.YConnect to a unix domain socket (the default docker socket is at /var/run/docker.sock)Docker seems to ignore the hostname in requests sent over unix domain sockets (and the port obviously doesn't matter either)The socket to connect tolmnoutsrqpvwxyz{|}~zyxvwopqrstulmn{|}~lmnopqrstuvwNone 36;<=>?KQVdNone 36;<=>?KQV1Gets the version of the docker engine remote API.-Lists all running docker containers. Pass in  {all = True}- to get a list of stopped containers as well.Lists all docker images. Deletes an image with the given d. See ImageDeleteOpts for options and use  for sane defaults.$Creates a docker container but does not start it. See ' for a list of options and you can use  for some sane defaults.Start a container from a given e that we get from . See D for a list of configuration options for starting a container. Use  for sane defaults.,Attempts to stop a container with the given eC gracefully (SIGTERM). The docker daemon will wait for the given a0 and then send a SIGKILL killing the container.(Blocks until a container with the given e# stops, then returns the exit codeSends a V! to the container with the given e . Same as $ but you choose the signal directly.$Restarts a container with the given e."Pauses a container with the given e.$Unpauses a container with the given e.#Deletes a container with the given e. See ContainerDeleteOpts for options and use  for sane defaults.Gets @ for a given e.#Get's container's logs for a given e . This will only work with the  G as the other driver types disable this endpoint and it will return a o.See $ for options that you can pass and  for sane defaults.NOTE: his function will fetch the entire log that the container produced in the json-file on disk. Depending on the logging setup of the process in your container this can be a significant amount which might block your application...so use with caution.HIf you want to stream the logs from the container continuosly then use NOTE+: It's recommended to use one of the other 8s available (like syslog) for creating your containers.AContinuously gets the container's logs as a stream. Uses conduit.Example: >>> import Docker.Client >>> import Data.Maybe >>> import Conduit >>> h <- defaultHttpHanlder >>> let cid = fromJust $ toContainerID "fee86e1d522b" >>> runDockerT (defaultClientOpts, h) $ getContainerLogsStream defaultLogOpts cid stdoutC  Build an Image from a DockerfileTODO: Add X-Registry-Config1TODO: Add support for remote URLs to a Dockerfile8TODO: Clean up temp tar.gz file after the image is built,Pulls an image from Docker Hub (by default).RTODO: Add support for X-Registry-Auth and pulling from private docker registries.TODO: Implement importImage function that uses he same CreateImageEndpoint but rather than pulling from docker hub it imports the image from a tarball or a URL.Creates networkRemoves a network(c) Deni Bertovic, 2014BSD3deni@denibertovic.com experimentalPOSIXNone 36;<=>?KQVh   -!"#$%&'()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`bacdhefgijklmnopqrstuvwxyz{|}~      !#"$%&'()*+,7-./012345689:;<=>?@APNBCDEFGHIJKLMOQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~lmnopqrstuvwxyz{|}~      !"##$%&'()*+,-./01234556789::;<==>?@@ABCDDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefgghijjklmnopqrstuvwwxxyz{|}~         !"#$%&'()*+,-./0123456789:;<=>>??@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIIJKLMNOPQRRSTUVWXYZ[\]^_`abcdeeffghiijjkklmnopqrstuvwxyz{|}~qAB%docker-0.6.0.0-Eu8gokDygoGCYtibOS2MkhDocker.Client.TypesDocker.Client.InternalDocker.Client.HttpDocker.Client.UtilsDocker.Client.ApigetContainerLogs Docker.ClientContainerConfighostname domainnameuser attachStdin attachStdout attachStderr exposedPortstty openStdin stdinOnceenvcmdimagevolumes workingDir entrypointnetworkDisabled macAddresslabels stopSignal Entrypoint ExposedPortEnvVarValueNamePortContainerResources cpuShares blkioWeightblkioWeightDeviceblkioDeviceReadBpsblkioDeviceWriteBpsblkioDeviceReadIOpsblkioDeviceWriteIOps cpuPeriod cpusetCpus cpusetMemsdevices kernelMemorymemorymemoryReservation memorySwapoomKillDisableulimitsMemoryConstraintMemoryConstraintSizeBMBGB DeviceRatedeviceRatePathdeviceRateRate DeviceWeightdeviceWeightPathdeviceWeightWeightUlimit ulimitName ulimitSoft ulimitHard HostConfigbindscontainerIDFile logConfig networkMode portBindings restartPolicy volumeDriver volumesFromcapAddcapDropdns dnsOptions dnsSearch extraHostsipcModelinks oomScoreAdj privilegedpublishAllPortsreadonlyRootfs securityOptshmSize resourcesUTSMode IsolationDefaultProcessHyperv RestartPolicy RestartAlwaysRestartUnlessStoppedRestartOnFailure RestartOff RetryCountHostPorthostIphostPost PortBinding containerPortportType hostPortsPortTypeTCPUDP NetworkID NetworkMode NetworkBridge NetworkHostNetworkDisabled NetworkNamedLogDriverConfigLogDriverOption LogDriverTypeJsonFileSyslogJournaldGelfFluentdAwsLogsSplunkEtwlogsLoggingDisabledLink VolumeFrom ContainerNameDevice pathOnHostpathInContainercgroupPermissionsBindhostSrc containerDestvolumePermissionVolumeVolumePermission ReadWriteReadOnlyCreateNetworkOptscreateNetworkNamecreateNetworkCheckDuplicatecreateNetworkDrivercreateNetworkInternalcreateNetworkEnableIPv6LogOptsstdoutstderrsince timestampstail TailLogOptTailAll TimestampImageDeleteOpts BuildOptsbuildImageNamebuildDockerfileName buildQuiet buildNoCachebuildRemoveItermediatebuildForceRemoveIntermediatebuildPullParentContainerDeleteOpts deleteVolumesforce StartOpts detachKeys DetachKeysWithCtrl WithoutCtrlDefaultDetachKey CreateOptscontainerConfig hostConfignetworkingConfigNetworkingConfigendpointsConfigEndpointConfigImage DockerImageimageId imageCreated imageParentId imageRepoTagsimageRepoDigests imageSizeimageVirtualSize imageLabelsTagLabelDigestStateCreated RestartingRunningPausedExitedDead Container containerIdcontainerNamescontainerImageNamecontainerImageIdcontainerCommandcontainerCreatedAtcontainerStatecontainerStatuscontainerPortscontainerLabelscontainerNetworkscontainerMountsNetworkSettingsnetworkSettingsBridgenetworkSettingsSandboxIdnetworkSettingsHairpinMode#networkSettingsLinkLocalIPv6Address%networkSettingsLinkLocalIPv6PrefixLennetworkSettingsPortsnetworkSettingsSandboxKey#networkSettingsSecondaryIPAddresses%networkSettingsSecondaryIPv6AddressesnetworkSettingsEndpointIDnetworkSettingsGateway networkSettingsGlobalIPv6Address"networkSettingsGlobalIPv6PrefixLennetworkSettingsIpAddressnetworkSettingsIpPrefixLennetworkSettingsIpv6GatewaynetworkSettingsMacAddressnetworkSettingsNetworksNetworkNetworkOptionsnetworkOptionsIdnetworkOptionsEndpointIdnetworkOptionsGatewaynetworkOptionsIpAddressnetworkOptionsIpPrefixLennetworkOptionsIpV6GatewaynetworkOptionsGlobalIPv6Address!networkOptionsGlobalIPv6PrefixLennetworkOptionsMacAddressContainerPortInfo ipAddressInfoprivatePortInfopublicPortInfo portTypeInfo DockerVersionversion apiVersion gitCommit goVersionosarch kernelVersion buildTimeListOptsallDockerClientOptsapiVerbaseUrlContainerStatecontainerErrorexitCode finishedAt oomKilleddeadpausedpid restartingrunning startedAtstateMount mountName mountSourcemountDestination mountDrivermountRWmountPropogationContainerDetailsappArmorProfileargscontainerDetailsConfigcreateddrivercontainerDetailsHostConfig hostnamePath hostsPathlogPathcontainerDetailsIdcontainerDetailsImage mountLabelnamenetworkSettingspath processLabelresolveConfPath restartCountcontainerDetailsStatemountsSignalSIGHUPSIGINTSIGQUITSIGSTOPSIGTERMSIGUSR1SIGSIGKILL StatusCodeTimeoutDefaultTimeoutImageID ContainerID ApiVersionURLEndpointVersionEndpointListContainersEndpointListImagesEndpointCreateContainerEndpointStartContainerEndpointStopContainerEndpointWaitContainerEndpointKillContainerEndpointRestartContainerEndpointPauseContainerEndpointUnpauseContainerEndpointContainerLogsEndpointDeleteContainerEndpointInspectContainerEndpointBuildImageEndpointCreateImageEndpointDeleteImageEndpointCreateNetworkEndpointRemoveNetworkEndpointfromContainerID toContainerID fromImageID toImageIDdefaultClientOptsdefaultListOptsdropImagePrefixdefaultContainerConfigdefaultHostConfigdefaultContainerResourcesdefaultCreateOptsdefaultStartOptsdefaultBuildOptsdefaultContainerDeleteOptsdefaultImageDeleteOptsdefaultLogOptsdefaultCreateNetworkOpts fromNetworkID toNetworkIDaddBindsetCmdaddLink addVolume addVolumeFromaddPortBindingaddExposedPort$fFromJSONContainerID$fToJSONContainerID$fFromJSONImageID$fToJSONImageID$fFromJSONStatusCode$fToJSONStatusCode$fToJSONSignal$fFromJSONSignal$fFromJSONMount$fFromJSONDockerVersion$fToJSONDockerVersion$fFromJSONNetworkOptions$fFromJSONState$fFromJSONContainerState$fToJSONEndpointConfig$fToJSONNetworkingConfig$fToJSONCreateNetworkOpts$fFromJSONVolumePermission$fToJSONVolumePermission $fFromJSON[] $fToJSON[] $fToJSONBind$fFromJSONBind$fFromJSONDevice$fToJSONDevice$fToJSONVolumeFrom$fFromJSONVolumeFrom $fToJSONLink$fFromJSONLink$fToJSONLogDriverType$fFromJSONLogDriverType$fToJSONNetworkMode$fFromJSONNetworkMode $fFromJSON[]0$fToJSONNetworkID$fFromJSONNetworkID$fFromJSONPortType$fToJSONPortType$fShowPortType$fToJSONRestartPolicy$fFromJSONRestartPolicy$fToJSONUlimit$fFromJSONUlimit$fToJSONDeviceWeight$fFromJSONDeviceWeight$fToJSONDeviceRate$fFromJSONDeviceRate$fFromJSONMemoryConstraint$fToJSONMemoryConstraint$fFromJSONContainerResources$fFromJSONHostPort$fToJSONHostPort $fToJSON[]0 $fFromJSON[]1$fFromJSONNetworkSettings$fFromJSONContainerPortInfo $fFromJSON[]2 $fToJSON[]1$fFromJSONLogDriverConfig$fToJSONLogDriverConfig$fToJSONHostConfig$fFromJSONHostConfig $fFromJSON[]3 $fToJSON[]2$fFromJSONImage$fFromJSONContainer$fToJSONEnvVar$fFromJSONEnvVar $fToJSON[]3 $fFromJSON[]4$fFromJSONEntrypoint$fToJSONEntrypoint$fFromJSONContainerConfig$fToJSONContainerConfig$fToJSONCreateOpts$fFromJSONContainerDetails$fEqContainerID$fShowContainerID $fEqImageID $fShowImageID $fEqTimeout $fShowTimeout $fEqSignal $fShowSignal $fEqMount $fShowMount$fGenericMount$fEqDockerClientOpts$fShowDockerClientOpts $fEqListOpts$fShowListOpts$fShowDockerVersion$fEqDockerVersion$fGenericDockerVersion$fEqNetworkOptions$fShowNetworkOptions $fEqState $fShowState$fGenericState$fEqContainerState$fShowContainerState$fGenericContainerState$fEqEndpointConfig$fShowEndpointConfig$fEqNetworkingConfig$fShowNetworkingConfig$fEqDetachKeys$fShowDetachKeys $fEqStartOpts$fShowStartOpts$fEqContainerDeleteOpts$fShowContainerDeleteOpts $fEqBuildOpts$fShowBuildOpts$fEqImageDeleteOpts$fShowImageDeleteOpts$fEqTailLogOpt$fShowTailLogOpt $fEqLogOpts $fShowLogOpts$fEqCreateNetworkOpts$fShowCreateNetworkOpts$fEqVolumePermission$fShowVolumePermission$fGenericVolumePermission $fEqVolume $fShowVolume$fEqBind $fShowBind $fEqDevice $fShowDevice$fGenericDevice$fEqVolumeFrom$fShowVolumeFrom$fEqLink $fShowLink$fEqLogDriverType$fShowLogDriverType$fEqNetworkMode$fShowNetworkMode$fOrdNetworkMode $fEqNetwork $fShowNetwork $fEqNetworkID$fShowNetworkID $fEqPortType$fGenericPortType$fReadPortType $fOrdPortType$fEqRestartPolicy$fShowRestartPolicy $fEqIsolation$fShowIsolation $fEqUTSMode $fShowUTSMode $fEqUlimit $fShowUlimit$fGenericUlimit$fShowDeviceWeight$fEqDeviceWeight$fShowDeviceRate$fEqDeviceRate$fEqMemoryConstraintSize$fShowMemoryConstraintSize$fEqMemoryConstraint$fShowMemoryConstraint$fEqContainerResources$fShowContainerResources$fGenericContainerResources $fEqHostPort$fShowHostPort$fEqPortBinding$fShowPortBinding$fEqNetworkSettings$fShowNetworkSettings$fEqContainerPortInfo$fShowContainerPortInfo$fEqLogDriverOption$fShowLogDriverOption$fEqLogDriverConfig$fShowLogDriverConfig$fEqHostConfig$fShowHostConfig$fGenericHostConfig $fEqLabel $fShowLabel $fShowImage $fEqImage$fGenericImage$fShowContainer $fEqContainer $fEqEnvVar $fShowEnvVar$fEqExposedPort$fShowExposedPort$fEqEntrypoint$fShowEntrypoint$fGenericEntrypoint$fEqContainerConfig$fShowContainerConfig$fGenericContainerConfig$fEqCreateOpts$fShowCreateOpts $fEqEndpoint$fShowEndpoint$fEqContainerDetails$fShowContainerDetails$fGenericContainerDetails encodeURLencodeURLWithQueryencodeQ getEndpointgetEndpointRequestBodygetEndpointContentTypeDockerT unDockerT DockerErrorDockerConnectionErrorDockerInvalidRequestDockerClientErrorDockerClientDecodeErrorDockerInvalidStatusCodeGenericDockerError HttpHandlerHttpVerbResponseRequest runDockerT mkHttpRequestdefaultHttpHandler httpHandlerunixHttpHandler$clientParamsWithClientAuthenticationclientParamsSetCAstatusCodeToError$fMonadIODockerT$fMonadTransDockerT$fMonadReader(,)DockerT$fMonadDockerT$fApplicativeDockerT$fShowDockerError$fFunctorDockerTBuildContextRootDir DockerIgnoreexclusionPatternsinclusionPatternsInclusionPatternExclusionPatternDirTreeFilemakeBuildContextmakeBuildContext'parseDockerIgnoreFilegetBuildContext shouldInclude shouldRecursedockerIgnoreDecisionexclusionCheckinclusionCheck$fEqExclusionPattern$fShowExclusionPattern$fEqInclusionPattern$fShowInclusionPattern$fEqDockerIgnore$fShowDockerIgnore$fEqBuildContextRootDir$fShowBuildContextRootDirgetDockerVersionlistContainers listImages deleteImagecreateContainerstartContainer stopContainer waitContainer killContainerrestartContainerpauseContainerunpauseContainerdeleteContainerinspectContainergetContainerLogsStreambuildImageFromDockerfile pullImage createNetwork removeNetwork EndpointNameAlias toJsonKey toJsonKeyValemptyJsonObject