ConceptsBuilds & runtimes
The build step
The build is the first step of a deploy. It goes from the source to an image in five steps.
Get the source. Ferry fetches the repository, or extracts the archive of ferry up.
1 / 5
During these steps, the status of the deploy is building.
The same steps in the log
Deploy log
$ ferry up node-hello --follow==> Starting deploy dep-3493c505ea9b4415b359 (trigger: upload)==> Extracting uploaded source archive==> Extracted 2 files (791 B)==> Detected Node.js runtime==> Generated Dockerfile.ferry for the Node.js runtime==> Building image ferry/node-hello:dep-3493c505ea9b4415b359#1 [internal] load build definition from Dockerfile.ferry…==> Build successful 🎉The full build output goes to the deploy log.
A build from git
The log shows the checkout:
==> Cloning from https://github.com/you/api (branch main)
==> Checked out c5f8f76: Initial commit
==> Using Dockerfile at ./Dockerfile
==> Building image ferry/api:dep-350f412fb3c741d0a2ab- Get the source. For a git service, Ferry fetches the repository into the git cache of the service. Then it checks out the branch, or the commit that you gave with
--commit. - Root directory. A monorepo needs one. See Root directory.
- docker build. BuildKit is the build engine of Docker. The tag of the image is
<prefix>/<service>:<deploy-id>, for exampleferry/api:dep-3493c505ea9b4415b359.
- The build gets the files of the commit, with no
.gitdirectory. - The app finds the commit in
FERRY_GIT_COMMITwhen it runs. - Ferry does not fetch git submodules.
Builds run on the server. The server runs 2 builds at a time by default (--build-concurrency).