diff --git a/content/docs/builds/dockerfiles.md b/content/docs/builds/dockerfiles.md index 67bdd6115..c1d34386f 100644 --- a/content/docs/builds/dockerfiles.md +++ b/content/docs/builds/dockerfiles.md @@ -37,6 +37,11 @@ If your Dockerfile is in another directory, specify it like this: RAILWAY_DOCKERFILE_PATH=/build/Dockerfile ``` +The Dockerfile path only selects which Dockerfile Railway uses. It does not +change the service's Root Directory or Docker build context. If the Dockerfile +expects files relative to a subdirectory, set that subdirectory as the service's +**Root Directory** in the service settings. + ### Use config as Code You can also set your custom Dockerfile path using [config as code](/config-as-code). diff --git a/content/docs/config-as-code/reference.md b/content/docs/config-as-code/reference.md index 26032ea22..f4cb89e5e 100644 --- a/content/docs/config-as-code/reference.md +++ b/content/docs/config-as-code/reference.md @@ -103,6 +103,11 @@ Location of non-standard Dockerfile. This field can be set to `null`. +This only selects the Dockerfile. It does not set the service's Root Directory +or change the Docker build context. If your Dockerfile is written for a +subdirectory, set the service's **Root Directory** to that subdirectory in the +service settings. + More about building from a Dockerfile [here](/builds/dockerfiles). ### Railpack version