WORKDIR
DOK-DL3000By using absolute paths you will not run into problems when a previous WORKDIR
instruction changes. You also often don't know the WORKDIR
context of your base container.
FROM debian:buster
WORKDIR usr/src/app
FROM debian:buster
WORKDIR /usr/src/app
When using environment replacements, absolute paths aren't required.
FROM debian:buster
ENV foo /bar
WORKDIR ${foo} # WORKDIR /bar