Existing files already in the current image will be overwritten in the new layer, and directories will be copied recursively. Any non-existant parent directories will be created.
This is equivalent to
COPY --from=src_imagein Dockerfile. Following Docker's behavior, if
srcis a directory, the content of
srcis copied into
dst, but not
srcitself. This means that
copy("dir", "/")is equivalent to
cp -r dir/* /, except that hidden files are also copied.
srcis a relative path, it is resolved based on the source image's working directory. If
dstis a relative path, it is resolved based on the current image's working directory.
::set_workdiralso allows specifying a relative path based on the input image's working directory. This will be resolved to an absolute path.
::set_entrypointwill clear any command the image has, to be consistent with the
ENTRYPOINTcommand in Dockerfile.
app :- ( from("alpine"), copy("./app", "/"), copy("./entrypoint.sh", "/") )::set_entrypoint("/entrypoint.sh") ::set_cmd(["start"]) ::set_label("org.opencontainers.image.vendor", "Modus").