Environment designed to be used in CI/CD pipelines to run karate-labs test
5.1K
sinfallas/karatelabs is a non-root (10001:10001), multi-architecture (linux/amd64, linux/arm64) Karate Labs BDD ephemeral test runner for the QA-11X standard built on Ubuntu 26.04 LTS with OpenJDK 26 and Karate 1.5.2. Its Maven dependency graph is pre-warmed inside /opt/m2/repository so tests execute immediately in air-gapped CI (--network none --read-only) without downloading JARs at runtime.
| Tag | Runtime / Base OS | Architectures | Notes / Channel |
|---|---|---|---|
latest, 2.1.4 | Ubuntu 26.04 LTS + OpenJDK 26 + Karate 1.5.2 | linux/amd64, linux/arm64 | Pre-warmed Maven offline BDD runner |
openjdk-26-jdk-headless, Apache Maven (/opt/maven) with hardened guava (33.8.0-jre) and non-root /usr/local/bin/mvn wrapper.1.5.2 (maven-surefire-plugin 3.5.3, maven-compiler-plugin 3.14.0, updated Jackson/Netty/Micrometer/Commons-IO/Thymeleaf BOMs) pre-seeded into /opt/m2/repository.ca-certificates, curl, wget, git, zip, unzip, nano, locales, tzdata, python3.| Setting | Default Value | Description |
|---|---|---|
USER | 10001:10001 (appuser) | Non-root runner; compatible with -u "$(id -u):$(id -g)" |
WORKDIR | /app | Pre-seeded Karate project root |
HOME | /tmp | Read-only root filesystem safe temporary home |
MAVEN_HOME | /opt/maven | Apache Maven installation directory |
HEALTHCHECK | java -version and /opt/maven/bin/mvn -v | Interval 30s, timeout 10s, retries 3 |
docker run and docker-compose.yml)--network none --read-only)mkdir -p test reports
docker run --rm --restart=no --network none --read-only \
--tmpfs /tmp:rw,exec,nosuid,nodev \
--tmpfs /app/target:rw,nosuid,nodev \
-u "$(id -u):$(id -g)" \
-e HOME=/tmp \
-v "$(pwd)/test:/app/src/test/java/examples/test:ro" \
sinfallas/karatelabs:latest \
mvn -B -o -ntp test
services:
karatelabs:
image: sinfallas/karatelabs:latest
restart: "no"
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
tmpfs:
- /tmp:rw,exec,nosuid,nodev
- /app/target:rw,nosuid,nodev
environment:
HOME: /tmp
TZ: ${TZ:-UTC}
volumes:
- ./test:/app/src/test/java/examples/test:ro
- ./reports:/app/target/karate-reports
example/), and Trivy AuditThe repository uses docker-bake.hcl (validate + release, publishing :2.1.4 and :latest in a single multi-tag build) and an offline example/ suite (JSON schema matching, embedded loopback HTTP mock, and negative failing contract):
# Inspect resolved Bake targets and audit Dockerfile/Compose IaC
./build.sh --print
./build.sh --check
# Build locally, run offline positive + negative .feature checks + Trivy, tag :2.1.4 and :latest
./build.sh --local
# Validate without overwriting local tags
./build.sh --validate-only
# Verify linux/arm64 execution
./build.sh --arm64-check
# Run pinned Trivy vulnerability scan directly
docker run --rm --restart=no \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v qa11x_trivy_cache:/root/.cache/trivy \
aquasec/trivy:0.76.2@sha256:8f6bb947dbc528902e11f2f5be52f7b519f6a39d5d148f41166f2040499768fb \
image --severity HIGH,CRITICAL --ignore-unfixed --exit-code 1 sinfallas/karatelabs:latest
<[email protected]> (Creado en Tecno Consultores)docker pull sinfallas/karatelabs:latest