docker/Dockerfile and built from ubuntu:focal — Ubuntu 20.04 LTS, the last release with ROS 1 support.
basis-env
Base development image with Clang 18, CMake, Protobuf, and Python tooling.
basis-env-ros
Extends
basis-env with ROS 1 Noetic packages for ROS-enabled builds.What’s included
basis-env
| Component | Details |
|---|---|
| Clang 18 | Compiler, clang++, clangd, clang-format, clang-tidy, lldb — set as the default CC/CXX |
| CMake | Installed from the Kitware APT repository (replaces any pre-existing system CMake) |
| Protobuf | libprotobuf-dev and protobuf-compiler |
| Build tools | make, ninja-build, ccache, git, libstdc++-11-dev |
| Debugging | libdw-dev (for stack traces), lldb |
| Foxglove bridge deps | libasio-dev, libssl-dev, libwebsocketpp-dev |
| Python | pip with jsonschema, pyyaml, jinja2 (used by code generation) |
| User | A basis user with passwordless sudo and video group membership |
basis-env-ros
Built on top ofbasis-env and additionally installs:
ros-noetic-roscpp-serializationros-noetic-std-msgsros-noetic-sensor-msgs(for tests)rapidjson-dev(forrosx_introspection)
Building the images
Usedocker/build-env.sh from the repository root:
basis-env unconditionally. It then builds basis-env-ros unless the environment variable BASIS_ENABLE_ROS is set to 0:
docker build flags after the script arguments:
Running the container
Usedocker/run-env.sh:
basis is already running, this attaches to it via docker exec. Otherwise it starts a new container:
- The repository root is mounted at
/basisinside the container. - A
deterministic_replaysibling directory (if present) is mounted at/deterministic_replay. - The container runs with
--privilegedto support hardware access (e.g., cameras via thevideogroup). - The container is removed on exit (
--rm). - The working directory inside the container is
/basis.
BASIS_DOCKER_ADDITIONAL_ARGS:
Building Basis inside the container
Once inside the container, build with CMake:CMake options
| Option | Default | Description |
|---|---|---|
BASIS_ENABLE_ROS | OFF | Enable ROS 1 Noetic support. Adds the BASIS_ENABLE_ROS=1 compile definition and sets BASIS_ROS_ROOT to /opt/ros/noetic. |
BASIS_ENABLE_TESTING | ON when top-level | Build unit and integration tests. Enables CTest. |
BASIS_INSTALL_DIR | /opt/basis | Installation prefix for binaries, libraries, and plugins. |
Environment setup
The container’s.bashrc sources /basis/bash/source_env.sh automatically. This script configures the runtime environment for installed Basis binaries: