Skip to content

Docker device setup

LAVA can use docker as a DUT and run test under Docker.

Create device-type

Create the device type using the name docker.

Create device

  1. Add the device using the following settings:
    • Device Type: docker
    • Hostname: A unique name (e.g., docker-01)
  2. Add the device configuration.

    For a standard docker device and a simple docker job, the following device dictionary should be sufficient:

    jinja {% extends "docker.jinja2" %}

Submit a job

Submit this simple test job:

```yaml device_type: docker job_name: simple docker test

timeouts: job: minutes: 15 visibility: public priority: medium

actions: - deploy: to: docker image: debian:trixie os: debian timeout: minutes: 10

  • boot: method: docker command: bash prompts: ['root@lava:/'] timeout: minutes: 5

  • test: timeout: minutes: 5 definitions:

    • from: inline name: smoke-tests-basic-inline path: inline/smoke-tests-basic.yaml repository: metadata: format: Lava-Test Test Definition 1.0 name: smoke-tests-basic run: steps:
      • lava-test-case check-lava-env --shell "printenv | grep 'LAVA_JOB_ID'"
      • lava-test-case check-sys-info --shell "uname -a | grep 'Debian'"
      • lava-test-case run-lscpu --shell lscpu

```