Metadata-Version: 2.1
Name: docker-mounter
Version: 0.1.0
Summary: Utility to mount Docker images locally without requiring container creation
License: MIT
Author: Joseph Redfern
Author-email: joseph@redfern.me
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: docker (>=7.1.0,<8.0.0)
Requires-Dist: loguru (>=0.7.3,<0.8.0)
Requires-Dist: typer (>=0.15.1,<0.16.0)
Description-Content-Type: text/markdown

# docker-mounter
Utility to mount Docker images locally without requiring container creation. This is useful for analysing contents of
Docker images from within the host operating system without incurring the overhead of container creation.

This tool relies on some potentially unstable docker implementation details, and may break in future Docker versions!

## Compatibility
Due to use of overlay2, tool is only compatible with Linux 3.19+.

It has currently only been tested with Docker version 27.3.1, build ce12230.

## Usage

```bash
Usage: docker-mount [OPTIONS] IMAGE

╭─ Arguments ─────────────────────────────────────────────────────────╮
│ *    image      TEXT  [default: None] [required]                    │
╰─────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────╮
│ --mount-point                  PATH  [default: None]                │
│ --pull           --no-pull           [default: no-pull]             │
│ --mount          --no-mount          [default: no-mount]            │
│ --help                               Show this message and exit.    │
╰─────────────────────────────────────────────────────────────────────╯
```

## Example Usage

### Mount ubuntu:latest image to /mnt/docker-image and pull the image if it is not present
```bash
docker-mount --mount --pull --mount-point /mnt/docker-image ubuntu:latest
```

### Mount ubuntu:latest image to /mnt/docker-image and do not pull the image
```bash
docker-mount --mount --no-pull --mount-point /mnt/docker-image ubuntu:latest
```

### Generate command to mount ubuntu:latest image to /mnt/docker-image but do not mount or pull the image
```bash
docker-mount --mount-point /mnt/docker-image ubuntu:latest
```

