# RTExit Docker Lab Setup

RTExit skills run inside the **rtexit-kali** container — a pre-built Kali Linux image with 300+ red team tools pre-installed.

---

## Quick Start (2 steps)

```bash
# 1. Start the container (first run downloads ~4GB image)
docker compose up -d

# 2. Enter the shell
docker exec -it rtexit-kali bash
```

That's it. Your project files are mounted at `/workspace` inside the container.

---

## Requirements

- Docker Desktop (Mac/Windows) or Docker Engine (Linux)
- ~6GB free disk space
- Internet connection for first image pull

---

## Commands

| Action | Command |
|--------|---------|
| Start container | `docker compose up -d` |
| Enter shell | `docker exec -it rtexit-kali bash` |
| Stop container | `docker compose down` |
| View logs | `docker compose logs -f` |
| Rebuild image | `docker compose build` |
| Update image | `docker compose pull && docker compose up -d` |

---

## What's Inside

- **189 RTExit skills** auto-installed at `/workspace/.agents/skills/`
- **300+ tools**: nmap, sqlmap, Metasploit, Frida, Impacket, BloodHound, Certipy, CrackMapExec, Burp Suite, etc.
- **rt-** aliases for every tool — just type `rt-` + Tab to see all
- Your project mounted at `/workspace` — changes persist on host

---

## Network Configuration

**Linux:** For best performance, use host network mode. Uncomment in docker-compose.yml:
```yaml
network_mode: host
```
And comment out the `ports:` section.

**Mac/Windows:** Use the default port-mapping mode (already configured).

---

## Build Locally (Optional)

If you prefer to build the image yourself instead of pulling:

```bash
# Edit docker-compose.yml:
# 1. Comment out:  image: ghcr.io/exit-code-eg/rtexit-kali:latest
# 2. Uncomment:    build:
#                    context: ./docker
#                    dockerfile: Dockerfile

# Build (takes 30-60 minutes)
docker compose build

# Start
docker compose up -d
```

---

## Verify Tools

```bash
docker exec rtexit-kali bash -c "rt-verify"
```

---

## Troubleshooting

**Container exits immediately:**
```bash
docker compose logs rtexit-kali
```

**Port already in use:**
Edit `docker-compose.yml` and change the conflicting port (e.g., `8081:8080`).

**Permission denied on files:**
```bash
docker exec rtexit-kali bash -c "chown -R root:root /workspace"
```

**Image pull fails (no GHCR access):**
Build locally — see "Build Locally" section above.
