!o      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None"#47=>?@AMSX)PdockerwExposedPort 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" ndockerThis 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" }] }dockerUsed 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" docker;Set permissions on volumes that you mount in the container.dockerOptions for creating a networkdockerThe network's namedocker(Check for networks with duplicate names.docker)Name of the network driver plugin to use.docker(Restrict external access to the network.dockerEnable IPv6 on the network.dockerALog options used when requesting the log output from a container.dockerLUsed for requesting N number of lines when tailing a containers log output.dockerTimestamp alias.dockerImage delete optsdocker2Options for when building images from a Dockerfiledocker9Image name in the form of name:tag; ie. myimage:latest.:wdocker(Name of dockerfile (default: Dockerfile)docker)Do not use cache when building the image.dockerGRemove intermediate containers after a successful build (default true).docker&Always remove intermediate containers.dockerVAlways attempt to pull a newer version of the *parent* image (ie. FROM debian:jessie).docker!Options for deleting a container.dockerAAutomatically cleanup volumes that the container created as well.docker8If the container is still running force deletion anyway.docker!Options for starting a container.dockeraOverride 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 _.docker&Options used for creating a Container.dockerDData type for the NetworkingConfig section of the container settingsdockerAlias for endpoint namedockerAEndpointsConfig is container configuration for a specific networkdockerAlias for Aliases.docker=Data type used for parsing information from a list of images.dockerAlias for Tags.dockerContainer and Image Labels.dockerTAlias for representing a RepoDigest. We could newtype this and add some validation.docker1Represents the state of the container life cycle.docker0Data type used for parsing a list of containers.dockerHData type reprsenting the various network settings a container can have. dockerXData type used for parsing the network information of each container when listing them.docker^Data type used for representing the information of various ports that a contianer may expose.dockerMData type used for represneting the version of the docker engine remote API.$docker@List options used for filtering the list of container or images.'dockerCClient options used to configure the remote engine we're talking to+dockerJData type used for parsing the container state from a list of containers.8dockerHData type used for parsing the mount information from a container list.Vdocker`Signal used for sending to the process running in the container. The default signal is SIGTERM.adockerDTimeout used for stopping a container. DefaultTimeout is 10 seconds.edockerID of a contianerfdockerWe should newtype thisgdockerWe should newtype thishdocker#List of Docker Engine API endpointstdocker`Second argument (Bool) is whether to follow which is currently hardcoded to False. See note in  for explanation why.xdockerPEither pull an image from docker hub or imports an image from a tarball (or URL)|docker<Used for extracting the id of the container from the newtype}dockerWUsed for parsing a Text value into a ContainerID. We apply some basic validation here.~docker9Used for extracting the id of the image from the newtype.dockerfHelper function used for parsing a Text value into an ImageID. For now just basic validation is used.dockerDefault DockerClientOpts' used for talking to the docker engine.dockerDefault ListOpts". Doesn't list stopped containers.dockerlHelper function used for dropping the "image" prefix when serializing the Image data type to and from json.dockerNContainer configuration used for creating a container with sensible defaults.docker7Default host confiratuon used for creating a container.dockerDefault create options when creating a container. You only need to specify an image name and the rest is all sensible defaults.docker(Default options for staring a container.dockerDefault 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.dockerSane image deletion defaultsdocker!Sensible default for log options.docker+Sensible defalut for create network optionsdocker<Used for extracting the id of the container from the newtypedocker/Used for parsing a Text value into a NetworkID.docker?A helper function to more easily add a bind mount to existing  CreateOpts records.dockerHHelper function for adding a Command to and existing CreateOpts record.dockerHelper function for adding a Link$ to and existing CreateOpts record.dockerHelper function for adding a Volume$ to and existing CreateOpts record.dockerHelper function for adding a  VolumeFrom$ to and existing CreateOpts record.docker>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"dockerHelper function for adding a  ExposedPort$ to and existing CreateOpts record.dockerpHelper function for converting a data type [a] to a json dictionary like so {"something": {}, "something2": {}}dockerxHelper function for converting a data type [a] to a json dictionary like so {"something": "val1", "something2": "val2"}docker4Helper function that return an empty dictionary "{}"   -!"#$%&'()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`bacdhefgijklmnopqrstuvwxyz{|}~      !#"$%&'()*+,7-./012345689:;<=>?@APNBCDEFGHIJKLMOQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~hijklmnopqrstuvwxyz{gfe|}d~vabc_`VWXYZ[\]^@APNBCDEFGHIJKLMOQRSTU'()*$%& !#"+,7-./0123456~|}wxyz{stu     89:;<=>?nopqrjklmidhefg`bac^_EFGHIJKLMNOPQRSTUVWXYZ[\]@ABCD -!"#$%&'()*+,./01  <=>?89:;234567None 47=>?@AMSXfghijkfghijkNone 47=>?@AMSX:sdocker6Could not parse the response from the Docker endpoint.tdocker0Invalid exit code received from Docker endpoint.dockerYConnect 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)dockerThe socket to connect tolmnoutsrqpvwxyz{|}~zyxvwoutsrqplmn{|}~None 47=>?@AMSXNone 47=>?@AMSXdocker1Gets the version of the docker engine remote API.docker-Lists all running docker containers. Pass in  {all = True}- to get a list of stopped containers as well.dockerLists all docker images.docker Deletes an image with the given d. See ImageDeleteOpts for options and use  for sane defaults.docker$Creates a docker container but does not start it. See ' for a list of options and you can use  for some sane defaults.dockerStart 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.docker,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.docker(Blocks until a container with the given e# stops, then returns the exit codedockerSends a V! to the container with the given e . Same as $ but you choose the signal directly.docker$Restarts a container with the given e.docker"Pauses a container with the given e.docker$Unpauses a container with the given e.docker#Deletes a container with the given e. See ContainerDeleteOpts for options and use  for sane defaults.dockerGets @ for a given e.docker#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.dockerAContinuously 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 docker 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 builtdocker,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.dockerCreates networkdockerRemoves a network(c) Deni Bertovic, 2014BSD3deni@denibertovic.com experimentalPOSIXNone 47=>?@AMSXc   -!"#$%&'()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`bacdhefgijklmnopqrstuvwxyz{|}~      !#"$%&'()*+,7-./012345689:;<=>?@APNBCDEFGHIJKLMOQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~lmnopqrstuvwxyz{|}~      !"##$%&'()*+,-./01234556789::;<==>?@@ABCDDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefgghijjklmnopqrstuvwwxxyz{|}~         !"#$%&'()*+,-./0123456789:;<=>>??@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIIJKLMNOPQRRSTUVWXYZ[\]^_`abcdeeffghiijjkklmnopqrstuvwxyz{|}~%docker-0.6.0.4-DxDVrDw8BEG9GdrKfUKn8ADocker.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