ConceptsBuilds & runtimes
Your own Dockerfile
With a Dockerfile in the root directory, Ferry builds your Dockerfile as it is.
The root directory has a Dockerfile. The runtime is docker.
1 / 3
Ferry uses your Dockerfile when the runtime is docker. It also uses it when the runtime is auto and the root directory has a Dockerfile.
==> Using Dockerfile at ./DockerfileThe rules
| Subject | Rule |
|---|---|
| Path | --dockerfile sets a path from the root directory. The default is Dockerfile. |
| Context | The build context is the root directory. Your .dockerignore applies. |
| Start command | If the service has a start command, it replaces the CMD of the image. Ferry runs it with /bin/sh -c. |
| Port | The port setting, a PORT variable, or the one port that the image EXPOSEs. If there is none, set --port. See The port of your app. |
| Variables | Your build gets them as secrets and as build arguments. See Secrets in a build. |
The path can point above the root directory, for example ../Dockerfile. It must stay in the repository.