Glad you figured it out! The downside to changing the working directory is that some people rely on the working directory staying at the root. For example, if you have docker/Dockerfile.base
. This is a common pattern using docker build
.
That said adding a flag to use the Dockerfile
root might be easier than having to know about this trick.