partydrone PRO said over 2 years ago on Docker on Rails 7 :
`WORKDIR /app` both (1) creates the directory if it doesn't exist and (2) sets it as the current working directory for all subsequent commands in the Dockerfile. For this reason, `RUN mkdir /app` is not necessary. 😉