Instruction: FROM
The FROM instruction bases the current layer on top of some the specified layer.
This instruction is not required. If no FROM instruction is used, the target
is building from an empty base, with no dependencies.
Multiple FROM instructions are not supported.
From sources
Raptor supports multiple options for from-source:
| Type | Schema | Example |
|---|---|---|
| Raptor | <none> | FROM library.base |
| Docker | docker:// | FROM docker://debian:trixie |
Raptor sources
When no schema is specified, the from-source is assumed to be the module
name of another raptor layer.
This will be familiar to docker users. For example..
# Dockerfile
FROM base
..will depend on the docker image base
However, unlike docker files, raptor can point to raptor files in other directories, or even other packages. See module names for an overview.
Examples
# This will depend on `base.rapt`
FROM base
# This will depend on `library/debian.rapt`
FROM library.debian
Docker sources
To use a docker image as the basis for a raptor layer, specify the name of the
docker image, prefixed with docker://, e.g:
FROM docker://debian:trixie
There are multiple (optional) parts in a docker reference, which has a surprisingly intricate syntax.
Raptor supports the entire grammar for docker references, so anything that
docker pull will accept, should work with FROM docker:// in raptor.