Safe Haskell | None |
---|---|
Language | GHC2021 |
Language.Docker.Syntax
Synopsis
- type Dockerfile = [InstructionPos Text]
- data Instruction args
- = From !BaseImage
- | Add !AddArgs !AddFlags
- | User !Text
- | Label !Pairs
- | Stopsignal !Text
- | Copy !CopyArgs !CopyFlags
- | Run !(RunArgs args)
- | Cmd !(Arguments args)
- | Shell !(Arguments args)
- | Workdir !Directory
- | Expose !Ports
- | Volume !Text
- | Entrypoint !(Arguments args)
- | Maintainer !Text
- | Env !Pairs
- | Arg !Text !(Maybe Text)
- | Healthcheck !(Check args)
- | Pragma !PragmaDirective
- | Comment !Text
- | OnBuild !(Instruction args)
- data InstructionPos args = InstructionPos {
- instruction :: !(Instruction args)
- sourcename :: !Filename
- lineNumber :: !Linenumber
- data BaseImage = BaseImage {}
- newtype SourcePath = SourcePath {
- unSourcePath :: Text
- newtype TargetPath = TargetPath {
- unTargetPath :: Text
- data Chown
- data CopySource
- = CopySource !Text
- | NoSource
- data CopyArgs = CopyArgs {
- sourcePaths :: NonEmpty SourcePath
- targetPath :: !TargetPath
- data AddArgs = AddArgs {
- sourcePaths :: NonEmpty SourcePath
- targetPath :: !TargetPath
- data Check args
- data CheckArgs args = CheckArgs {
- checkCommand :: !(Arguments args)
- interval :: !(Maybe Duration)
- timeout :: !(Maybe Duration)
- startPeriod :: !(Maybe Duration)
- retries :: !(Maybe Retries)
- data Image = Image {
- registryName :: !(Maybe Registry)
- imageName :: !Text
- newtype Registry = Registry {
- unRegistry :: Text
- newtype ImageAlias = ImageAlias {
- unImageAlias :: Text
- newtype Tag = Tag {
- unTag :: Text
- newtype Digest = Digest {
- unDigest :: Text
- newtype Ports = Ports {}
- type Directory = Text
- data Arguments args
- = ArgumentsText args
- | ArgumentsList args
- type Pairs = [(Text, Text)]
- type Filename = Text
- type Platform = Text
- type Linenumber = Int
- data PragmaDirective
- newtype Retries = Retries {
- times :: Int
- data PortSpec
- data Checksum
- = Checksum !Text
- | NoChecksum
- data Chmod
- data Link
- newtype Duration = Duration {
- durationTime :: DiffTime
- data CopyFlags = CopyFlags {
- chownFlag :: !Chown
- chmodFlag :: !Chmod
- linkFlag :: !Link
- sourceFlag :: !CopySource
- data AddFlags = AddFlags {}
- data RunMount
- data BindOpts = BindOpts {
- bTarget :: !TargetPath
- bSource :: !(Maybe SourcePath)
- bFromImage :: !(Maybe Text)
- bReadOnly :: !(Maybe Bool)
- data CacheOpts = CacheOpts {
- cTarget :: !TargetPath
- cSharing :: !(Maybe CacheSharing)
- cCacheId :: !(Maybe Text)
- cReadOnly :: !(Maybe Bool)
- cFromImage :: !(Maybe Text)
- cSource :: !(Maybe SourcePath)
- cMode :: !(Maybe Text)
- cUid :: !(Maybe Text)
- cGid :: !(Maybe Text)
- newtype TmpOpts = TmpOpts {}
- data SecretOpts = SecretOpts {
- sTarget :: !(Maybe TargetPath)
- sCacheId :: !(Maybe Text)
- sIsRequired :: !(Maybe Bool)
- sSource :: !(Maybe SourcePath)
- sMode :: !(Maybe Text)
- sUid :: !(Maybe Text)
- sGid :: !(Maybe Text)
- data CacheSharing
- data RunSecurity
- data RunNetwork
- data RunFlags = RunFlags {
- mount :: !(Set RunMount)
- security :: !(Maybe RunSecurity)
- network :: !(Maybe RunNetwork)
- data RunArgs args = RunArgs (Arguments args) RunFlags
- newtype EscapeChar = EscapeChar {
- escape :: Char
- newtype SyntaxImage = SyntaxImage {}
- defaultEsc :: Char
- data Port
- data PortRange = PortRange !Port !Port
- data Protocol
Documentation
type Dockerfile = [InstructionPos Text] Source #
Type of the Dockerfile AST
data Instruction args Source #
All commands available in Dockerfiles
Constructors
From !BaseImage | |
Add !AddArgs !AddFlags | |
User !Text | |
Label !Pairs | |
Stopsignal !Text | |
Copy !CopyArgs !CopyFlags | |
Run !(RunArgs args) | |
Cmd !(Arguments args) | |
Shell !(Arguments args) | |
Workdir !Directory | |
Expose !Ports | |
Volume !Text | |
Entrypoint !(Arguments args) | |
Maintainer !Text | |
Env !Pairs | |
Arg !Text !(Maybe Text) | |
Healthcheck !(Check args) | |
Pragma !PragmaDirective | |
Comment !Text | |
OnBuild !(Instruction args) |
Instances
data InstructionPos args Source #
Instruction
with additional location information required for creating
good check messages
Constructors
InstructionPos | |
Fields
|
Instances
Constructors
BaseImage | |
newtype SourcePath Source #
Constructors
SourcePath | |
Fields
|
Instances
IsString SourcePath Source # | |
Defined in Language.Docker.Syntax Methods fromString :: String -> SourcePath | |
Show SourcePath Source # | |
Defined in Language.Docker.Syntax Methods showsPrec :: Int -> SourcePath -> ShowS show :: SourcePath -> String showList :: [SourcePath] -> ShowS | |
Eq SourcePath Source # | |
Defined in Language.Docker.Syntax | |
Ord SourcePath Source # | |
Defined in Language.Docker.Syntax Methods compare :: SourcePath -> SourcePath -> Ordering (<) :: SourcePath -> SourcePath -> Bool (<=) :: SourcePath -> SourcePath -> Bool (>) :: SourcePath -> SourcePath -> Bool (>=) :: SourcePath -> SourcePath -> Bool max :: SourcePath -> SourcePath -> SourcePath min :: SourcePath -> SourcePath -> SourcePath |
newtype TargetPath Source #
Constructors
TargetPath | |
Fields
|
Instances
IsString TargetPath Source # | |
Defined in Language.Docker.Syntax Methods fromString :: String -> TargetPath | |
Show TargetPath Source # | |
Defined in Language.Docker.Syntax Methods showsPrec :: Int -> TargetPath -> ShowS show :: TargetPath -> String showList :: [TargetPath] -> ShowS | |
Eq TargetPath Source # | |
Defined in Language.Docker.Syntax | |
Ord TargetPath Source # | |
Defined in Language.Docker.Syntax Methods compare :: TargetPath -> TargetPath -> Ordering (<) :: TargetPath -> TargetPath -> Bool (<=) :: TargetPath -> TargetPath -> Bool (>) :: TargetPath -> TargetPath -> Bool (>=) :: TargetPath -> TargetPath -> Bool max :: TargetPath -> TargetPath -> TargetPath min :: TargetPath -> TargetPath -> TargetPath |
data CopySource Source #
Constructors
CopySource !Text | |
NoSource |
Instances
IsString CopySource Source # | |
Defined in Language.Docker.Syntax Methods fromString :: String -> CopySource | |
Show CopySource Source # | |
Defined in Language.Docker.Syntax Methods showsPrec :: Int -> CopySource -> ShowS show :: CopySource -> String showList :: [CopySource] -> ShowS | |
Eq CopySource Source # | |
Defined in Language.Docker.Syntax | |
Ord CopySource Source # | |
Defined in Language.Docker.Syntax Methods compare :: CopySource -> CopySource -> Ordering (<) :: CopySource -> CopySource -> Bool (<=) :: CopySource -> CopySource -> Bool (>) :: CopySource -> CopySource -> Bool (>=) :: CopySource -> CopySource -> Bool max :: CopySource -> CopySource -> CopySource min :: CopySource -> CopySource -> CopySource |
Constructors
CopyArgs | |
Fields
|
Constructors
AddArgs | |
Fields
|
Instances
Functor Check Source # | |
Show args => Show (Check args) Source # | |
Eq args => Eq (Check args) Source # | |
Ord args => Ord (Check args) Source # | |
Constructors
CheckArgs | |
Fields
|
Instances
Functor CheckArgs Source # | |
Show args => Show (CheckArgs args) Source # | |
Eq args => Eq (CheckArgs args) Source # | |
Ord args => Ord (CheckArgs args) Source # | |
Defined in Language.Docker.Syntax Methods compare :: CheckArgs args -> CheckArgs args -> Ordering (<) :: CheckArgs args -> CheckArgs args -> Bool (<=) :: CheckArgs args -> CheckArgs args -> Bool (>) :: CheckArgs args -> CheckArgs args -> Bool (>=) :: CheckArgs args -> CheckArgs args -> Bool |
Constructors
Image | |
Fields
|
Constructors
Registry | |
Fields
|
newtype ImageAlias Source #
Constructors
ImageAlias | |
Fields
|
Instances
IsString ImageAlias Source # | |
Defined in Language.Docker.Syntax Methods fromString :: String -> ImageAlias | |
Show ImageAlias Source # | |
Defined in Language.Docker.Syntax Methods showsPrec :: Int -> ImageAlias -> ShowS show :: ImageAlias -> String showList :: [ImageAlias] -> ShowS | |
Eq ImageAlias Source # | |
Defined in Language.Docker.Syntax | |
Ord ImageAlias Source # | |
Defined in Language.Docker.Syntax Methods compare :: ImageAlias -> ImageAlias -> Ordering (<) :: ImageAlias -> ImageAlias -> Bool (<=) :: ImageAlias -> ImageAlias -> Bool (>) :: ImageAlias -> ImageAlias -> Bool (>=) :: ImageAlias -> ImageAlias -> Bool max :: ImageAlias -> ImageAlias -> ImageAlias min :: ImageAlias -> ImageAlias -> ImageAlias |
Constructors
ArgumentsText args | |
ArgumentsList args |
Instances
Functor Arguments Source # | |||||
IsString (Arguments Text) Source # | |||||
Defined in Language.Docker.Syntax Methods fromString :: String -> Arguments Text | |||||
IsList (Arguments Text) Source # | |||||
Defined in Language.Docker.Syntax Associated Types
| |||||
Show args => Show (Arguments args) Source # | |||||
Eq args => Eq (Arguments args) Source # | |||||
Ord args => Ord (Arguments args) Source # | |||||
Defined in Language.Docker.Syntax Methods compare :: Arguments args -> Arguments args -> Ordering (<) :: Arguments args -> Arguments args -> Bool (<=) :: Arguments args -> Arguments args -> Bool (>) :: Arguments args -> Arguments args -> Bool (>=) :: Arguments args -> Arguments args -> Bool | |||||
type Item (Arguments Text) Source # | |||||
Defined in Language.Docker.Syntax type Item (Arguments Text) = Text |
type Linenumber = Int Source #
data PragmaDirective Source #
Constructors
Escape !EscapeChar | |
Syntax !SyntaxImage |
Instances
Show PragmaDirective Source # | |
Defined in Language.Docker.Syntax Methods showsPrec :: Int -> PragmaDirective -> ShowS show :: PragmaDirective -> String showList :: [PragmaDirective] -> ShowS | |
Eq PragmaDirective Source # | |
Defined in Language.Docker.Syntax Methods (==) :: PragmaDirective -> PragmaDirective -> Bool (/=) :: PragmaDirective -> PragmaDirective -> Bool | |
Ord PragmaDirective Source # | |
Defined in Language.Docker.Syntax Methods compare :: PragmaDirective -> PragmaDirective -> Ordering (<) :: PragmaDirective -> PragmaDirective -> Bool (<=) :: PragmaDirective -> PragmaDirective -> Bool (>) :: PragmaDirective -> PragmaDirective -> Bool (>=) :: PragmaDirective -> PragmaDirective -> Bool max :: PragmaDirective -> PragmaDirective -> PragmaDirective min :: PragmaDirective -> PragmaDirective -> PragmaDirective |
Constructors
PortSpec !Port | |
PortRangeSpec !PortRange |
Constructors
Checksum !Text | |
NoChecksum |
Constructors
Duration | |
Fields
|
Constructors
CopyFlags | |
Fields
|
Constructors
AddFlags | |
Constructors
BindMount !BindOpts | |
CacheMount !CacheOpts | |
TmpfsMount !TmpOpts | |
SecretMount !SecretOpts | |
SshMount !SecretOpts |
Constructors
BindOpts | |
Fields
|
Constructors
CacheOpts | |
Fields
|
Constructors
TmpOpts | |
Fields |
data SecretOpts Source #
Constructors
SecretOpts | |
Fields
|
Instances
Default SecretOpts Source # | |
Defined in Language.Docker.Syntax Methods def :: SecretOpts | |
Show SecretOpts Source # | |
Defined in Language.Docker.Syntax Methods showsPrec :: Int -> SecretOpts -> ShowS show :: SecretOpts -> String showList :: [SecretOpts] -> ShowS | |
Eq SecretOpts Source # | |
Defined in Language.Docker.Syntax | |
Ord SecretOpts Source # | |
Defined in Language.Docker.Syntax Methods compare :: SecretOpts -> SecretOpts -> Ordering (<) :: SecretOpts -> SecretOpts -> Bool (<=) :: SecretOpts -> SecretOpts -> Bool (>) :: SecretOpts -> SecretOpts -> Bool (>=) :: SecretOpts -> SecretOpts -> Bool max :: SecretOpts -> SecretOpts -> SecretOpts min :: SecretOpts -> SecretOpts -> SecretOpts |
data CacheSharing Source #
Instances
Show CacheSharing Source # | |
Defined in Language.Docker.Syntax Methods showsPrec :: Int -> CacheSharing -> ShowS show :: CacheSharing -> String showList :: [CacheSharing] -> ShowS | |
Eq CacheSharing Source # | |
Defined in Language.Docker.Syntax | |
Ord CacheSharing Source # | |
Defined in Language.Docker.Syntax Methods compare :: CacheSharing -> CacheSharing -> Ordering (<) :: CacheSharing -> CacheSharing -> Bool (<=) :: CacheSharing -> CacheSharing -> Bool (>) :: CacheSharing -> CacheSharing -> Bool (>=) :: CacheSharing -> CacheSharing -> Bool max :: CacheSharing -> CacheSharing -> CacheSharing min :: CacheSharing -> CacheSharing -> CacheSharing |
data RunSecurity Source #
Instances
Show RunSecurity Source # | |
Defined in Language.Docker.Syntax Methods showsPrec :: Int -> RunSecurity -> ShowS show :: RunSecurity -> String showList :: [RunSecurity] -> ShowS | |
Eq RunSecurity Source # | |
Defined in Language.Docker.Syntax | |
Ord RunSecurity Source # | |
Defined in Language.Docker.Syntax Methods compare :: RunSecurity -> RunSecurity -> Ordering (<) :: RunSecurity -> RunSecurity -> Bool (<=) :: RunSecurity -> RunSecurity -> Bool (>) :: RunSecurity -> RunSecurity -> Bool (>=) :: RunSecurity -> RunSecurity -> Bool max :: RunSecurity -> RunSecurity -> RunSecurity min :: RunSecurity -> RunSecurity -> RunSecurity |
data RunNetwork Source #
Constructors
NetworkNone | |
NetworkHost | |
NetworkDefault |
Instances
Show RunNetwork Source # | |
Defined in Language.Docker.Syntax Methods showsPrec :: Int -> RunNetwork -> ShowS show :: RunNetwork -> String showList :: [RunNetwork] -> ShowS | |
Eq RunNetwork Source # | |
Defined in Language.Docker.Syntax | |
Ord RunNetwork Source # | |
Defined in Language.Docker.Syntax Methods compare :: RunNetwork -> RunNetwork -> Ordering (<) :: RunNetwork -> RunNetwork -> Bool (<=) :: RunNetwork -> RunNetwork -> Bool (>) :: RunNetwork -> RunNetwork -> Bool (>=) :: RunNetwork -> RunNetwork -> Bool max :: RunNetwork -> RunNetwork -> RunNetwork min :: RunNetwork -> RunNetwork -> RunNetwork |
Constructors
RunFlags | |
Fields
|
Instances
Functor RunArgs Source # | |
IsString (RunArgs Text) Source # | |
Defined in Language.Docker.Syntax Methods fromString :: String -> RunArgs Text | |
Show args => Show (RunArgs args) Source # | |
Eq args => Eq (RunArgs args) Source # | |
Ord args => Ord (RunArgs args) Source # | |
Defined in Language.Docker.Syntax |
newtype EscapeChar Source #
Constructors
EscapeChar | |
Fields
|
Instances
IsChar EscapeChar Source # | |
Defined in Language.Docker.Syntax | |
Show EscapeChar Source # | |
Defined in Language.Docker.Syntax Methods showsPrec :: Int -> EscapeChar -> ShowS show :: EscapeChar -> String showList :: [EscapeChar] -> ShowS | |
Eq EscapeChar Source # | |
Defined in Language.Docker.Syntax | |
Ord EscapeChar Source # | |
Defined in Language.Docker.Syntax Methods compare :: EscapeChar -> EscapeChar -> Ordering (<) :: EscapeChar -> EscapeChar -> Bool (<=) :: EscapeChar -> EscapeChar -> Bool (>) :: EscapeChar -> EscapeChar -> Bool (>=) :: EscapeChar -> EscapeChar -> Bool max :: EscapeChar -> EscapeChar -> EscapeChar min :: EscapeChar -> EscapeChar -> EscapeChar |
newtype SyntaxImage Source #
Constructors
SyntaxImage | |
Instances
Show SyntaxImage Source # | |
Defined in Language.Docker.Syntax Methods showsPrec :: Int -> SyntaxImage -> ShowS show :: SyntaxImage -> String showList :: [SyntaxImage] -> ShowS | |
Eq SyntaxImage Source # | |
Defined in Language.Docker.Syntax | |
Ord SyntaxImage Source # | |
Defined in Language.Docker.Syntax Methods compare :: SyntaxImage -> SyntaxImage -> Ordering (<) :: SyntaxImage -> SyntaxImage -> Bool (<=) :: SyntaxImage -> SyntaxImage -> Bool (>) :: SyntaxImage -> SyntaxImage -> Bool (>=) :: SyntaxImage -> SyntaxImage -> Bool max :: SyntaxImage -> SyntaxImage -> SyntaxImage min :: SyntaxImage -> SyntaxImage -> SyntaxImage |
defaultEsc :: Char Source #
A port can either be a number (plus a protocol, tcp by default) or a variable.
A port range starts and ends with either a number or a variable and can have a protocol associated (tcp by default). The protocol of the start and end port shall be ignored.