Metadata-Version: 2.4
Name: container_runner
Version: 0.2.0
Summary: Runner of containers module
Home-page: https://github.com/IslasGECI/container_runner
Author: Ciencia de Datos • GECI
Author-email: ciencia.datos@islas.org.mx
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
License-File: LICENSE
Requires-Dist: typer[all]

<a href="https://www.islas.org.mx/"><img src="https://www.islas.org.mx/img/logo.svg" align="right" width="256" /></a>

# Container Runner

Run Make targets inside Docker containers.

![example branch parameter](https://github.com/IslasGECI/container_runner/actions/workflows/actions.yml/badge.svg)
[![codecov](https://codecov.io/gh/IslasGECI/container_runner/graph/badge.svg?token=WK9wnLnZQ2)](https://codecov.io/gh/IslasGECI/container_runner)
![licencia](https://img.shields.io/github/license/IslasGECI/container_runner)
![languages](https://img.shields.io/github/languages/top/IslasGECI/container_runner)
![commits](https://img.shields.io/github/commit-activity/y/IslasGECI/container_runner)
![PyPI - Version](https://img.shields.io/pypi/v/container_runner)

## What it does

Container Runner lets you execute a Makefile target inside any Docker image and captures whether it succeeded or failed. You specify the image, the target, and your Bitbucket credentials, and it runs the command in an isolated container.

## Before you start

You need:
- A Bitbucket API token with repository access permissions
- Your Bitbucket account email

## How to use it

```bash
container_runner run-container \
  --image islasgeci/hola \
  --target mundo \
  --path ./hola/ \
  --container my_container \
  --token YOUR_API_TOKEN \
  --email YOUR_EMAIL
```

This runs `make mundo` inside the `islasgeci/hola` image, mounting `./hola/` as the working directory. A file named `.make_succeeded` is created if the target completes successfully, or removed if it fails.

## Run with Docker

```bash
docker run --volume $PWD:/workdir islasgeci/container_runner:latest \
  container_runner run-container \
    --image islasgeci/hola \
    --target mundo \
    --path ./hola/ \
    --container my_container \
    --token YOUR_TOKEN \
    --email YOUR_EMAIL
```

