Adds a file with the given content to the build context and appends
COPY ["<name>", "<destination>"], where name is its name in the context.
Adds a local directory to the build context and appends COPY ["<name>", "<destination>"], where name is its name in the context. As with any
COPY of a directory, its contents are copied into the destination, not
the directory itself. It is read when pushed, with files keeping their
permissions, a link to a file within the directory stored as a copy of
the file, a link to a file outside it failing the push, and a link to a
directory stored as an empty directory. Everything in it is added: no
.dockerignore or default ignore rules apply.
Needs a runtime with Node's filesystem API.
Adds a local file to the build context and appends COPY ["<name>", "<destination>"], where name is its name in the context. The file is read
when pushed, keeping its permissions, and a symbolic link is read as the
file it points to.
Needs a runtime with Node's filesystem API; elsewhere, use addFile.
Appends RUN apt-get update && apt-get install -y --no-install-recommends <args> && rm -rf /var/lib/apt/lists/*, as one step so the package lists
add nothing to the image.
Appends ARG <name>, or ARG <name>="<defaultValue>" with the default
escaped as in env.
OptionaldefaultValue: stringAppends COPY ["<source>", "<destination>"], copying from the build context.
The Dockerfile, exactly as it is pushed.
Appends each line verbatim, for anything the other methods do not cover,
such as comments, CMD, or a heredoc. A line may contain newlines, and
nothing is checked or escaped.
Appends ENTRYPOINT ["<arg>", ...], in exec form. The image then runs
this instead of the sandbox API binary, so it must start that itself for
the sandbox to be reachable.
Appends ENV <name>="<value>" for each variable, with " and \ in the
value escaped. $ is left as is, so the build expands variables in it,
as in { PATH: "/opt/bin:$PATH" }.
Appends RUN go install <package> && go install <package> ..., one
go install per package, since one call can only install packages from
a single module.
Appends LABEL <key>="<value>" for each label, escaped as in env.
Appends RUN npm install <args>, or RUN npm install with no arguments
to install from the working directory's package.json.
Appends RUN pipx install <package> && pipx install <package> ..., one per package.
Appends RUN <command> for each command, in shell form.
StaticfromStarts a builder from a registry image, as FROM <baseImage>.
Describes an image as a Dockerfile and the files it copies in, to push with ImageClient.push. Start one with ImageBuilder.fromRegistry.
A builder never changes: each method returns a new builder with the instruction appended, so one builder can safely be the base of several.
The Dockerfile it pushes ends by copying in the sandbox API binary and making it the entrypoint, unless the builder already did either, since a sandbox needs it running to be reached. dockerfile shows the Dockerfile exactly as pushed.