Note: This is an example of how to create custom drivers for Molecule. It is not upstream for any official Molecule drivers, there will be no further support. Do not use this in production
This section describes everything you need to start use of custom_docker
:
- Access to Docker without
sudo
- Python >= 3.10
- Molecule >= 5.0.1
These collections will be installed automaticly during dependency
stage:
community.docker
>= 3.4.6
- Install driver via
pip
:pip install git+ssh://git@github.com:VorobevPavel-dev/molecule_custom_docker.git
- Check if driver is available:
> molecule drivers ────────────────────── custom_docker delegated
- Create scenario using installed driver
# default scenario molecule init scenario -d custom_docker # named scenario molecule init scenario -d custom_docker <scenario_name>
- Start testing
molecule test -s <scenario_name>
You can provide configuration for test resources in molecule.yml
file of scenario:
name (str, Required)
: name of created platformimage (str, Required)
: Docker image to use. Example:python
tag (str, Required)
: tag of Docker image. Example:3.10-slim-buster