Every step in your pipeline executes on an isolated and ephemeral workspace, that has been provisioned with a build environment. Through Pipeline YAML, you can control which environment your steps execute in. We currently supports two types of build environment -
- With Docker images (
containers) - a composable and flexible environment where you can customize it with container images (managed by your organization or community).
- With a Linux VM image (
os_image) - Linux VM is managed by us where most commonly used build tools and programming language runtimes are pre-installed.
Both environment types have advantages and disadvantages compared to each other. It's possible to choose a different environment for every jobs in your
.razorops.yaml by specifying
Use Docker environment¶
In Docker based environment, your steps will be running inside a Docker container. To know more about Docker concepts, please refer here. It acts as a composable and flexible environment where you can customize it with container images (managed by your organization or community). It helps you to define a custom environment having the exact tools and pin down versions of dependencies you require.
Under the hood, a Docker environment is created in an ephemeral VM by spawning your primary container and using exec Docker-API to run your steps inside. To help you decide when to choose Docker build environment -
- If you want to have full control over the softwares installed in your build environment.
- If you need custom software that is not available in the VM images toolbox.
- It has faster start-up time than VM based environment.
Use Linux VM environment¶
VM based environment provides full access to OS resources and have most commonly used build tools and programming language runtimes pre-installed. It's based on Ubuntu Focal (20.04 LTS) distribution for Linux based runner. To know more about what's available inside, refer to "Toolbox".
To help you decide when to choose VM build environment -
If you want to build or push container images efficiently without the overhead of Docker-in-Docker.
If you want to have full access to OS resources like devices and network stack.