Removes a line at the specified position from a dockerfile
.
See also
dfm_add_line()
for adding a line &
dfm_replace_line()
for replacing a line
Other dockerfile modification functions:
dfm_add_line()
,
dfm_group_similar()
,
dfm_move_line()
,
dfm_replace_line()
,
dfm_sort_by_instruction()
Examples
df <- dockerfile() |>
dfi_from("rocker/r-ver:4.4.0") |>
dfi_run("apt-get update") |>
dfi_run("apt-get install -y libcurl4-openssl-dev")
# Remove the second RUN instruction (line 3)
df <- dfm_remove_line(df, 3)