Back to Skills

flox-containers

verified

Containerizing Flox environments with Docker/Podman. Use for creating container images, OCI exports, multi-stage builds, and deployment workflows.

View on GitHub

Marketplace

flox-agentic

flox/flox-agentic

Plugin

flox

Repository
Verified Org

flox/flox-agentic
3stars

flox-plugin/skills/flox-containers/SKILL.md

Last Verified

January 14, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/flox/flox-agentic/blob/main/flox-plugin/skills/flox-containers/SKILL.md -a claude-code --skill flox-containers

Installation paths:

Claude
.claude/skills/flox-containers/
Powered by add-skill CLI

Instructions

# Flox Containerization Guide

## Core Commands

```bash
flox containerize                          # Export to default tar file
flox containerize -f ./mycontainer.tar     # Export to specific file
flox containerize --runtime docker         # Export directly to Docker
flox containerize --runtime podman         # Export directly to Podman
flox containerize -f - | docker load       # Pipe to Docker
flox containerize --tag v1.0               # Tag container image
flox containerize -r owner/env             # Containerize remote environment
```

## Basic Usage

### Export to File

```bash
# Export to file
flox containerize -f ./mycontainer.tar
docker load -i ./mycontainer.tar

# Or use default filename: {name}-container.tar
flox containerize
docker load -i myenv-container.tar
```

### Export Directly to Runtime

```bash
# Auto-detects docker or podman
flox containerize --runtime docker

# Explicit runtime selection
flox containerize --runtime podman
```

### Pipe to Stdout

```bash
# Pipe directly to Docker
flox containerize -f - | docker load

# With tagging
flox containerize --tag v1.0 -f - | docker load
```

## How Containers Behave

**Containers activate the Flox environment on startup** (like `flox activate`):

- **Interactive**: `docker run -it <image>` → Bash shell with environment activated
- **Non-interactive**: `docker run <image> <cmd>` → Runs command with environment activated (like `flox activate -- <cmd>`)
- All packages, variables, and hooks are available inside the container

**Note**: Flox sets an entrypoint that activates the environment, then runs `cmd` inside that activation.

## Command Options

```bash
flox containerize
  [-f <file>]           # Output file (- for stdout); defaults to {name}-container.tar
  [--runtime <runtime>] # docker/podman (auto-detects if not specified)
  [--tag <tag>]         # Container tag (e.g., v1.0, latest)
  [-d <path>]           # Path to .flox/ directory
  [-r <owner/name>]     # Remote environment from FloxHub
```

#

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
10190 chars