Img2Num Docker Script
The img2num script is the recommended way to interact with the Docker development
environment. It automatically manages the development container for you.
You normally don't need to specify a Docker image.
The script automatically:
- Reuses the last image you used.
- Falls back to the default development image if none has been selected.
The image selection flags below are only useful if you want to override this behaviour (see Selecting a Docker image).
Common commands
Open a shell
- Linux / macOS
- Windows CMD
- PowerShell
./img2num sh
.\img2num.bat sh
.\img2num.ps1 sh
Starts (if necessary) and opens an interactive Bash shell inside the Docker development container.
Run a command
- Linux / macOS
- Windows CMD
- PowerShell
./img2num run <command>
.\img2num.bat run <command>
.\img2num.ps1 run <command>
Runs a one-off command inside the Docker development container.
Example:
./img2num run just build docs
runandexecare interchangeable.
Stop the container
- Linux / macOS
- Windows CMD
- PowerShell
./img2num stop
.\img2num.bat stop
.\img2num.ps1 stop
Stops the running development container while preserving its data.
Selecting a Docker image
Most users can ignore this section.
If you need to use a different development image, you can override the automatically selected image for a single command.
--img
Use a specific Docker image.
./img2num sh --img ghcr.io/ryan-millard/img2num-dev:latest
--dh-img
Shorthand for Docker Hub images.
./img2num sh --dh-img dev
Equivalent to:
./img2num sh --img ryanmillard/img2num-dev:dev
--ghcr-img
Shorthand for GitHub Container Registry images.
./img2num sh --ghcr-img latest
Equivalent to:
./img2num sh --img ghcr.io/ryan-millard/img2num-dev:latest
More commands
The script also supports commands such as:
restartdownpurgedestroylogslast-image
For the complete command reference, run:
- Linux / macOS
- Windows CMD
- PowerShell
./img2num help
.\img2num.bat help
.\img2num.ps1 help