Interface Docker

All Superinterfaces:
org.openrewrite.Tree
All Known Subinterfaces:
Docker.ArgumentContent, Docker.CommandForm, Docker.CopyAddForm, Docker.Instruction
All Known Implementing Classes:
Docker.Add, Docker.Arg, Docker.Argument, Docker.Cmd, Docker.Copy, Docker.CopyShellForm, Docker.Entrypoint, Docker.Env, Docker.EnvironmentVariable, Docker.ExecForm, Docker.Expose, Docker.File, Docker.Flag, Docker.From, Docker.Healthcheck, Docker.HeredocBody, Docker.HeredocForm, Docker.Label, Docker.Literal, Docker.Maintainer, Docker.Onbuild, Docker.Port, Docker.Run, Docker.Shell, Docker.ShellForm, Docker.Stage, Docker.Stopsignal, Docker.User, Docker.Volume, Docker.Workdir

public interface Docker extends org.openrewrite.Tree
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    ADD instruction - adds files from source to destination (can extract archives and fetch URLs)
    static class 
    ARG instruction - defines a build argument
    static class 
    An argument which can be plain text, quoted string, or environment variable
    static interface 
    Content within an argument (text, quoted string, or variable reference)
    static class 
    CMD instruction - provides defaults for executing container
    static interface 
    Base for command forms (used by RUN, CMD, ENTRYPOINT)
    static class 
    COPY instruction - copies files from source to destination
    static interface 
    Base for COPY/ADD forms (shell form, exec form, or heredoc)
    static class 
    Shell form for COPY/ADD instructions: sources followed by destination.
    static class 
    ENTRYPOINT instruction - configures container to run as executable
    static class 
    ENV instruction - sets environment variables
    static class 
    Environment variable reference like $VAR or ${VAR}
    static class 
    Exec form: CMD ["executable", "param1", "param2"] Also used for COPY/ADD JSON array form.
    static class 
    EXPOSE instruction - documents ports that the container listens on
    static class 
    Root node representing a complete Dockerfile or Containerfile
    static class 
    A flag like --platform=linux/amd64
    static class 
    FROM instruction - sets the base image
    static class 
    HEALTHCHECK instruction - tells Docker how to test container health
    static class 
    Represents a single heredoc body within a heredoc command.
    static class 
    Unified heredoc form supporting both single and multiple heredocs.
    static interface 
    Base interface for all Dockerfile instructions
    static class 
    LABEL instruction - adds metadata to an image
    static class 
    A literal text value, either plain (unquoted) or quoted (single/double quotes).
    static class 
    MAINTAINER instruction - sets the author field (deprecated but still supported)
    static class 
    ONBUILD instruction - prefixes another instruction to be executed later
    static class 
    A port specification in an EXPOSE instruction.
    static class 
    RUN instruction - executes commands
    static class 
    SHELL instruction - sets the default shell
    static class 
    Shell form: CMD command param1 param2
    static class 
    A build stage in a multi-stage Dockerfile.
    static class 
    STOPSIGNAL instruction - sets the signal to stop the container
    static class 
    USER instruction - sets the user and optionally group
    static class 
    VOLUME instruction - creates a mount point
    static class 
    WORKDIR instruction - sets the working directory
  • Method Summary

    Modifier and Type
    Method
    Description
    default <R extends org.openrewrite.Tree, P>
    R
    accept(org.openrewrite.TreeVisitor<R,P> v, P p)
     
    default <P> @Nullable Docker
     
     
    default <P> boolean
    isAcceptable(org.openrewrite.TreeVisitor<?,P> v, P p)
     
    <D extends Docker>
    D
    withPrefix(Space prefix)
     

    Methods inherited from interface org.openrewrite.Tree

    cast, getId, getMarkers, isScope, print, print, print, printer, printTrimmed, printTrimmed, printTrimmed, withId, withMarkers
  • Method Details

    • accept

      default <R extends org.openrewrite.Tree, P> R accept(org.openrewrite.TreeVisitor<R,P> v, P p)
      Specified by:
      accept in interface org.openrewrite.Tree
    • acceptDocker

      default <P> @Nullable Docker acceptDocker(DockerVisitor<P> v, P p)
    • isAcceptable

      default <P> boolean isAcceptable(org.openrewrite.TreeVisitor<?,P> v, P p)
      Specified by:
      isAcceptable in interface org.openrewrite.Tree
    • getPrefix

      Space getPrefix()
    • withPrefix

      <D extends Docker> D withPrefix(Space prefix)