ֲN      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNone!"259:;<=IOT9wExposedPort 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" fThis 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.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.!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.=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.2Represents the status 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 toJData type used for parsing the container state from a list of containers.HData type used for parsing the mount information from a container list.4`Signal used for sending to the process running in the container. The default signal is SIGTERM.=DTimeout used for stopping a container. DefaultTimeout is 10 seconds.AID of a contianerBWe should newtype thisCWe should newtype thisD#List of Docker Engine API endpointsO`Second argument (Bool) is whether to follow which is currently hardcoded to False. See note in  for explanation why.R<Used for extracting the id of the container from the newtypeSWUsed for parsing a Text value into a ContainerID. We apply some basic validation here.T9Used for extracting the id of the image from the newtype.UfHelper function used for parsing a Text value into an ImageID. For now just basic validation is used.VDefault DockerClientOpts' used for talking to the docker engine.WDefault ListOpts". Doesn't list stopped containers.XlHelper function used for dropping the "image" prefix when serializing the Image data type to and from json.YNContainer configuration used for creating a container with sensible defaults.Z7Default 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._!Sensible default for log options.`?A helper function to more easily add a bind mount to existing  CreateOpts records.aHHelper function for adding a Command to and existing CreateOpts record.bHelper function for adding a Link$ to and existing CreateOpts record.cHelper function for adding a Volume$ to and existing CreateOpts record.dHelper function for adding a  VolumeFrom$ to and existing CreateOpts record.e>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"fHelper function for adding a  ExposedPort$ to and existing CreateOpts record.NpHelper function for converting a data type [a] to a json dictionary like so {"something": {}, "something2": {}}OxHelper function for converting a data type [a] to a json dictionary like so {"something": "val1", "something2": "val2"}P4Helper function that return an empty dictionary "{}"  !"#$%&'()*+,-./QRSTUV0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@WAXBCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_Y`abcdefZNOPghijklmnopqrstuvwxyz{|}~g  + !"#$%&'()*,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\`]^_abcdefghijklmnopqrstuvwxyz{|}~     .2 !"#$%&'()*+,-/013456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgDEFGHIJKLMNOPQCBARS@TU=>?456789:;< !"#$%&'()*+,-./0123VW     X\]^_vwxyz{|}~tursnopqklmfghijbcdea\]^_`XYZ[VW=>?@ABCDEFGHIJKLMNOPQRSTUZ89:;< !"#$%&'()*+,-./[ Y45670123ef`abcd  !"#$%&'()*+,-./QRSTUV0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv wxyz{|}~           !"#$%&'()*+,-./0123456789:;<=>?@WAXBCD EFGHIJKLMNOPQRSTUVWXYZ[\]^_Y`abcdefZNOPghijklmnopqrstuvwxyz{|}~None 259:;<=IOT !"# !"# !"# !"#None 259:;<=IOT*6Could not parse the response from the Docker endpoint.+0Invalid exit code received from Docker endpoint.5YConnect 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)$%&'()*+,-./012345The socket to connect to6789:;<=$%&'()*+,-./0123456780/.-'()*+,$%&=<;:912345678$%&'()*+,-./0123456789:;<=None 259:;<=IOT A1Gets the version of the docker engine remote API.B-Lists all running docker containers. Pass in W {all = True}- to get a list of stopped containers as well.CLists all docker images.D$Creates a docker container but does not start it. See ' for a list of options and you can use \ for some sane defaults.EStart a container from a given A that we get from D. See D for a list of configuration options for starting a container. Use ] for sane defaults.F,Attempts to stop a container with the given AC gracefully (SIGTERM). The docker daemon will wait for the given =0 and then send a SIGKILL killing the container.GSends a 4! to the container with the given A . Same as F$ but you choose the signal directly.H$Restarts a container with the given A.I"Pauses a container with the given A.J$Unpauses a container with the given A.K#Deletes a container with the given A. See  DeleteOpts for options and use ^ for sane defaults.LGets  for a given A.M#Get's container's logs for a given A . This will only work with the w vG as the other driver types disable this endpoint and it will return a '.See $ for options that you can pass and _ for sane defaults.NOTE,: Currently streaming logs is not supported and this 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.2The recommended method is to use one of the other v8s available (like syslog) for creating your containers.[\]ABCDEFGHIJKLM ABCDEFGHIJKLM BDEFGHIJKLMCA[\]ABCDEFGHIJKLM(c) Deni Bertovic, 2016BSD3deni@denibertovic.com experimentalPOSIXNone 259:;<=IOT  + !"#$%&'()*,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\`]^_abcdefghijklmnopqrstuvwxyz{|}~     .2 !"#$%&'()*+,-/013456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef$%&'()*+,-./012345678ABCDEFGHIJKLM^      !!"#$%&'()*+,-./0123345667899:;<==>?@ABCDEFGHIJKLMNOPQRSTUUVWXYZ[\]^_``abccdefghijklmnnoopqrstuvwxyzz{{|}}~      !""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./012334567$%89:;<=docker-0.3.0.0-inplaceDocker.Client.TypesDocker.Client.InternalDocker.Client.HttpDocker.Client.ApigetContainerLogs Docker.ClientContainerConfighostname domainnameuser attachStdin attachStdout attachStderr exposedPortstty openStdin stdinOnceenvcmdimagevolumes workingDir entrypointnetworkDisabled macAddresslabels stopSignal ExposedPortEnvVarValueNamePortContainerResources cpuShares blkioWeightblkioWeightDeviceblkioDeviceReadBpsblkioDeviceWriteBpsblkioDeviceReadIOpsblkioDeviceWriteIOps cpuPeriod cpusetCpus cpusetMemsdevices kernelMemorymemorymemoryReservation memorySwapoomKillDisableulimits 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 NetworkModeBridgeHostNetworkDisabledLogDriverConfigLogDriverOption LogDriverTypeJsonFileSyslogJournaldGelfFluentdAwsLogsSplunkEtwlogsLoggingDisabledLink VolumeFrom ContainerNameDevice pathOnHostpathInContainercgroupPermissionsBindhostSrc containerDestvolumePermissionVolumeVolumePermission ReadWriteReadOnlyLogOptsstdoutstderrsince timestampstail TailLogOptTailAll Timestamp DeleteOpts deleteVolumesforce StartOpts detachKeys DetachKeysWithCtrl WithoutCtrlDefaultDetachKey CreateOptscontainerConfig hostConfigImage DockerImageimageId imageCreated imageParentId imageRepoTagsimageRepoDigests imageSizeimageVirtualSize imageLabelsTagLabelDigestStatusCreated RestartingRunningPausedExitedDead Container containerIdcontainerNamescontainerImageNamecontainerImageIdcontainerCommandcontainerCreatedAtcontainerStatuscontainerPortscontainerLabelscontainerNetworkscontainerMountsNetworkSettingsnetworkSettingsBridgenetworkSettingsSandboxIdnetworkSettingsHairpinMode#networkSettingsLinkLocalIPv6Address%networkSettingsLinkLocalIPv6PrefixLennetworkSettingsPortsnetworkSettingsSandboxKey#networkSettingsSecondaryIPAddresses%networkSettingsSecondaryIPv6AddressesnetworkSettingsEndpointIDnetworkSettingsGateway networkSettingsGlobalIPv6Address"networkSettingsGlobalIPv6PrefixLennetworkSettingsIpAddressnetworkSettingsIpPrefixLennetworkSettingsIpv6GatewaynetworkSettingsMacAddressnetworkSettingsNetworksNetworkNetworkOptionsnetworkOptionsIdnetworkOptionsEndpointIdnetworkOptionsGatewaynetworkOptionsIpAddressnetworkOptionsIpPrefixLennetworkOptionsIpV6GatewaynetworkOptionsGlobalIPv6Address!networkOptionsGlobalIPv6PrefixLennetworkOptionsMacAddressContainerPortInfo ipAddressInfoprivatePortInfopublicPortInfo portTypeInfo DockerVersionversion apiVersion gitCommit goVersionosarch kernelVersion buildTimeListOptsallDockerClientOptsapiVerbaseUrlContainerStatecontainerErrorexitCode finishedAt oomKilleddeadpausedpid restartingrunning startedAtstatusMount mountName mountSourcemountDestination mountDriver mountModemountRWmountPropogationContainerDetailsappArmorProfileargscontainerDetailsConfigcreateddrivercontainerDetailsHostConfig hostnamePath hostsPathlogPathcontainerDetailsIdcontainerDetailsImage mountLabelnamenetworkSettingspath processLabelresolveConfPath restartCountstatemountsSignalSIGHUPSIGINTSIGQUITSIGSTOPSIGTERMSIGUSR1SIGSIGKILLTimeoutDefaultTimeoutImageID ContainerID ApiVersionURLEndpointVersionEndpointListContainersEndpointListImagesEndpointCreateContainerEndpointStartContainerEndpointStopContainerEndpointKillContainerEndpointRestartContainerEndpointPauseContainerEndpointUnpauseContainerEndpointContainerLogsEndpointDeleteContainerEndpointInspectContainerEndpointfromContainerID toContainerID fromImageID toImageIDdefaultClientOptsdefaultListOptsdropImagePrefixdefaultContainerConfigdefaultHostConfigdefaultContainerResourcesdefaultCreateOptsdefaultStartOptsdefaultDeleteOptsdefaultLogOptsaddBindsetCmdaddLink addVolume addVolumeFromaddPortBindingaddExposedPort$fFromJSONContainerConfig$fToJSONContainerConfig $fToJSON[] $fFromJSON[]$fToJSONEnvVar$fFromJSONEnvVar$fFromJSONContainerResources$fFromJSONMemoryConstraint$fToJSONMemoryConstraint$fToJSONDeviceRate$fFromJSONDeviceRate$fToJSONDeviceWeight$fFromJSONDeviceWeight$fToJSONUlimit$fFromJSONUlimit$fToJSONHostConfig$fFromJSONHostConfig$fToJSONRestartPolicy$fFromJSONRestartPolicy$fFromJSONHostPort$fToJSONHostPort $fToJSON[]0 $fFromJSON[]0$fFromJSONPortType$fToJSONPortType$fShowPortType$fToJSONNetworkMode$fFromJSONNetworkMode$fFromJSONLogDriverConfig$fToJSONLogDriverConfig $fFromJSON[]1 $fToJSON[]1$fToJSONLogDriverType$fFromJSONLogDriverType $fToJSONLink$fFromJSONLink $fToJSONBind$fToJSONVolumeFrom$fFromJSONVolumeFrom$fFromJSONDevice$fToJSONDevice$fFromJSONBind $fFromJSON[]2 $fToJSON[]2$fFromJSONVolumePermission$fToJSONVolumePermission$fToJSONCreateOpts$fFromJSONImage $fFromJSON[]3 $fToJSON[]3$fFromJSONStatus$fFromJSONContainer$fFromJSONNetworkSettings $fFromJSON[]4$fFromJSONNetworkOptions$fFromJSONContainerPortInfo$fFromJSONImageID$fToJSONImageID$fFromJSONContainerID$fToJSONContainerID$fFromJSONContainerDetails$fFromJSONDockerVersion$fToJSONDockerVersion$fFromJSONContainerState$fFromJSONMount$fToJSONSignal$fFromJSONSignal$fEqContainerID$fShowContainerID $fEqImageID $fShowImageID $fEqTimeout $fShowTimeout $fEqSignal $fShowSignal$fEqDockerClientOpts$fShowDockerClientOpts $fEqListOpts$fShowListOpts$fShowDockerVersion$fEqDockerVersion$fGenericDockerVersion$fEqNetworkOptions$fShowNetworkOptions $fEqStatus $fShowStatus$fGenericStatus$fEqContainerState$fShowContainerState$fGenericContainerState$fEqDetachKeys$fShowDetachKeys $fEqStartOpts$fShowStartOpts$fEqDeleteOpts$fShowDeleteOpts$fEqTailLogOpt$fShowTailLogOpt $fEqLogOpts $fShowLogOpts$fEqVolumePermission$fShowVolumePermission$fGenericVolumePermission $fEqMount $fShowMount$fGenericMount $fEqVolume $fShowVolume$fEqBind $fShowBind $fEqDevice $fShowDevice$fGenericDevice$fEqVolumeFrom$fShowVolumeFrom$fEqLink $fShowLink$fEqLogDriverType$fShowLogDriverType$fEqNetworkMode$fShowNetworkMode$fOrdNetworkMode $fEqNetwork $fShowNetwork $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$fEqContainerConfig$fShowContainerConfig$fGenericContainerConfig$fEqCreateOpts$fShowCreateOpts $fEqEndpoint$fShowEndpoint$fEqContainerDetails$fShowContainerDetails$fGenericContainerDetails encodeURLencodeURLWithQueryencodeQ getEndpointgetEndpointRequestBodyDockerT unDockerT DockerErrorDockerConnectionErrorDockerInvalidRequestDockerClientDecodeErrorDockerInvalidStatusCodeGenericDockerError HttpHandlerHttpVerbResponseRequest runDockerT mkHttpRequestdefaultHttpHandler httpHandlerunixHttpHandler$clientParamsWithClientAuthenticationclientParamsSetCAstatusCodeToError$fMonadIODockerT$fMonadTransDockerT$fMonadReader(,)DockerT$fMonadDockerT$fApplicativeDockerT$fEqDockerError$fShowDockerError$fFunctorDockerTgetDockerVersionlistContainers listImagescreateContainerstartContainer stopContainer killContainerrestartContainerpauseContainerunpauseContainerdeleteContainerinspectContainer toJsonKey toJsonKeyValemptyJsonObjectMemoryConstraintMemoryConstraintSizeBMBGBportAndType2TextparseIntegerText requestUnit requestHelper parseResponse