Sign inSign up

malovec/robot-runner

By malovec

•Updated about 1 month ago

Robot Framework docker image based on Python Hardened Image

Image
Integration & delivery
Developer tools
0

663

malovec/robot-runner repository overview

"Buy Me A Coffee"

⁠Robot Framework Multi-Platform Docker Image

Multi-Platform Support Python Version Robot Framework

A hardened, multi-platform Docker image for running Robot Framework test automation across x64 and ARM architectures (including Apple Silicon). This image provides a secure, portable environment for test execution with built-in support for performance testing tools.

⁠🌟 Features

  • Multi-Architecture Support: Runs seamlessly on x64, ARM, and Apple Silicon
  • Hardened Security: Built on Docker's official hardened Python base image
  • Pre-installed Tools:
    • Robot Framework 7.x
    • Modern Python 3.12 environment
    • Alpine Linux-based for minimal footprint
  • Flexible Execution: Run Robot tests or any custom command
  • Optimized Dependencies: Pre-cached package installation for faster builds

ā šŸš€ Quick Start

⁠Basic Robot Framework Execution
docker run --rm -v $(pwd):/robot malovec/robot-runner:latest tests/suite.robot
⁠Interactive Shell Access
docker run --rm -ti -e CMD=bash malovec/robot-runner:latest

ā šŸ“¦ Image Contents

⁠Pre-installed Packages

Python Libraries:

  • Robot Framework 7.x
  • Browser and SeleniumLibrary for web testing
  • Appium Library for mobile testing
  • Requests library for API testing
  • All major Robot Framework ecosystem packages

System Tools:

  • Node.js/npm packages for modern web testing
  • Alpine Linux system dependencies

ā šŸ› ļø Usage Examples

⁠1. Run Robot Tests with Output Directory
docker run --rm                             \
  -v $(pwd):/robot                          \
  malovec/robot-runner:latest               \
  --outputdir results tests/
⁠2. Run Specific Robot Suite with Variables
docker run --rm                             \
  -v $(pwd):/robot                          \
  malovec/robot-runner:latest               \
  --variable BROWSER:chrome                 \
  --suite smoke_tests tests/suite.robot
⁠3. Run Custom Python Scripts
docker run --rm                                   \
  -v $(pwd):/robot                                \
  -e CMD=python                                   \
  malovec/robot-runner:latest                     \
  my_script.py

ā šŸ”§ Advanced Configuration

⁠Volume Mounts for Data Persistence
# Mount current directory and specific output directory
docker run --rm                                        \
  -v $(pwd)/tests:/robot/tests                         \
  -v $(pwd)/results:/robot/results                     \
  malovec/robot-runner:latest                          \
  --outputdir /robot/results /robot/tests
⁠Environment Variable Configuration
docker run --rm                                        \
  -v $(pwd):/robot                                     \
  -e PYTHONPATH=/robot/lib                             \
  -e ROBOT_OPTIONS="--loglevel DEBUG"                  \
  malovec/robot-runner:latest
⁠Docker Compose Integration
version: '3.8'
services:
  robot-tests:
    image: malovec/robot-runner:latest
    volumes:
      - ./tests:/robot/tests
      - ./results:/robot/results
    command: --outputdir /robot/results /robot/tests/smoke.robot

ā šŸ—ļø Building from Source

⁠Build for Multiple Architectures
# Build for both x64 and ARM
docker buildx build --platform linux/amd64,linux/arm64    \
  -t malovec/robot-runner:latest                          \
  --push .
⁠Custom Python Version
# Build with specific Python version
docker build --build-arg DHI_PYTHON_BUILD_TAG=3.11-alpine3.22-dev \
  -t my-robot-runner:custom .

ā šŸ”’ Security Features

  • Built on Docker's hardened Python base image
  • Non-root user execution support
  • Minimal Alpine Linux base for reduced attack surface
  • Regular security updates from upstream bases
  • Python bytecode writing disabled (PYTHONDONTWRITEBYTECODE=1)

ā šŸ“‹ Requirements File Structure

The image uses a structured approach for dependencies:

requirements/
ā”œā”€ā”€ apk.in      # Alpine Linux packages
ā”œā”€ā”€ npm.in      # Node.js packages  
└── python.in   # Python packages

ā šŸ“„ License

This project is open source. Please check the respective licenses for included tools:

  • Robot Framework: Apache License 2.0
  • Python: Python Software Foundation License

⁠Note: This image is optimized for CI/CD pipelines and automated testing environments. For development purposes, consider using the interactive shell mode for debugging and exploration.

Built with ā¤ļø for the Robot Framework community

Tag summary

Content type

Image

Digest

sha256:5ac7bb297…

Size

205.1 MB

Last updated

about 1 month ago

docker pull malovec/robot-runner