Add a MAINTAINER instruction to a dockerfile (deprecated)
Source: R/dockerfile-instructions.R
dfi_maintainer.RdAdds a MAINTAINER instruction to specify the author of the image.
This instruction is deprecated in favor of using LABEL maintainer=....
Arguments
- dockerfile
A
dockerfileobject- maintainer
Maintainer info (e.g., "Name email@example.com")
Details
The MAINTAINER instruction has been deprecated since Docker 1.13.0 (2017)
in favor of using LABEL maintainer=.... This function is provided for
compatibility with older Dockerfiles, but new Dockerfiles should use
dfi_label(maintainer = ...) instead.
See also
dfi_label() for the recommended way to specify the maintainer &
Official Docker deprecated MAINTAINER documentation
Other dockerfile instruction functions:
dfi_add(),
dfi_arg(),
dfi_cmd(),
dfi_copy(),
dfi_entrypoint(),
dfi_env(),
dfi_expose(),
dfi_from(),
dfi_healthcheck(),
dfi_label(),
dfi_onbuild(),
dfi_run(),
dfi_shell(),
dfi_stopsignal(),
dfi_user(),
dfi_volume(),
dfi_workdir()
Examples
# Using the deprecated MAINTAINER instruction
df <- dockerfile() |>
dfi_from("rocker/r-ver:4.4.0") |>
dfi_maintainer("John Doe <john@example.com>")
#> Warning: MAINTAINER is deprecated. Use `dfi_label(maintainer = ...)` instead.
df
#> FROM rocker/r-ver:4.4.0
#> MAINTAINER John Doe <john@example.com>
# Better approach using LABEL
df <- dockerfile() |>
dfi_from("rocker/r-ver:4.4.0") |>
dfi_label(maintainer = "John Doe <john@example.com>")
df
#> FROM rocker/r-ver:4.4.0
#> LABEL maintainer="John Doe <john@example.com>"