HUB
Sign inSign up
karatelabs logo

sinfallas/karatelabs

By sinfallas

•Updated 3 days ago

Environment designed to be used in CI/CD pipelines to run karate-labs test

Image
Languages & frameworks
Developer tools
0

5.1K

sinfallas/karatelabs repository overview

⁠sinfallas/karatelabs

Docker Pulls Image Size Multi-Arch License: GPL-2.0-only QA-11X Rule Zero

⁠1. Purpose and Technical Summary

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.

⁠2. Supported Tags and Architectures

TagRuntime / Base OSArchitecturesNotes / Channel
latest, 2.1.4Ubuntu 26.04 LTS + OpenJDK 26 + Karate 1.5.2linux/amd64, linux/arm64Pre-warmed Maven offline BDD runner

⁠3. Preinstalled Toolchain and Dependencies

  • Java & Build: openjdk-26-jdk-headless, Apache Maven (/opt/maven) with hardened guava (33.8.0-jre) and non-root /usr/local/bin/mvn wrapper.
  • Karate Template & Offline Cache: Karate 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.
  • System Utilities: ca-certificates, curl, wget, git, zip, unzip, nano, locales, tzdata, python3.

⁠4. Environment Variables, Permissions, and HEALTHCHECK

SettingDefault ValueDescription
USER10001:10001 (appuser)Non-root runner; compatible with -u "$(id -u):$(id -g)"
WORKDIR/appPre-seeded Karate project root
HOME/tmpRead-only root filesystem safe temporary home
MAVEN_HOME/opt/mavenApache Maven installation directory
HEALTHCHECKjava -version and /opt/maven/bin/mvn -vInterval 30s, timeout 10s, retries 3

⁠5. Quickstart (docker run and docker-compose.yml)

⁠Air-Gapped Offline Execution (--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
⁠Extracting HTML Reports via Docker Compose
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

⁠6. Local Build, Validation (example/), and Trivy Audit

The 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

⁠7. Source Code, Support, Author, and License

Tag summary
Recent tags
Content type
Image
Digest
sha256:f6e88a593…
Size
340 MB
Last updated
3 days ago
docker pull sinfallas/karatelabs:latest