# justin
Run [just](https://github.com/casey/just) commands inside a container.
## Installation
System-wide:
```
$ just install
```
User:
```
$ just install ~/.local
```
## Running just
```
$ justin --workspace . just ...
$ justin --workspace . --copy just ...
$ justin \
-E podman \
-F ci
-w . \
-v ./artifacts:/artifacts\
just -f ci.justfile somestage
```
## Building images
Default image:
```
$ justin build
```
### Flavors
```
$ justin --flavor minimal build
$ justin --flavor ci build
$ justin -F /path/to/my/flavor build
```
justin supports a concept of "flavors", which is a way to customize how
images are built. justin ships with the following flavors:
- `minimal` (default one) - creates a minimal image viable for running just
commands.
- `ci` - creates a bigger image with some tools preinstalled, more suitable
for continuous integration systems.
You may also point justin to a the directory with a custom flavor, which
is located outside of the original build context. justin will copy and
use your flavor.
During build flavors are copied to /install directory within a built
container.
Flavors have the following requirements:
- they must provide a Flavor Configuration File (see below)
- inside a flavor directory there must be an `install` directory, which will
be copied into `/install` within the container, but which will be removed
from the final image
- they must provide an executable `/install/install.sh`
- they must install `/usr/bin/tini` and `just` executables within the
container
- they must provide `/usr/local/bin/docker-entrypoint` executable within the
container, which will be used as container entrypoint
### Flavor Configuration File
Each flavor must provide a `flavor.toml` file with `[build.args]` section.
Each field from the `[build.args]` section will be used as a `--build-arg`
during the build. In case of name conflicts between build args in flavor.toml
and `--build-arg` passed in command line, command line ones have priority.
Example:
```toml
[build.args]
FROM_IMAGE = "debian"
FROM_TAG = "trixie-slim"
VENDOR = "John Doe's Company"
AUTHORS = "John Doe"
VERSION = "1.0"
ARCH = "x86-64"
DESCRIPTION = "One image to rule them all"
JUST_EXECUTABLE = "just"
```
Raw data
{
"_id": null,
"home_page": "https://git.goral.net.pl/gws/justin.git/about",
"name": "justin-runner",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "just",
"author": "Michal Goral",
"author_email": "dev@goral.net.pl",
"download_url": "https://files.pythonhosted.org/packages/d3/7f/c3d594c9a8a2f09f018e7b2e4e08d36e98e62d5a94a614c8631e00ad1c0a/justin_runner-0.1.0.tar.gz",
"platform": null,
"description": "# justin\n\nRun [just](https://github.com/casey/just) commands inside a container.\n\n## Installation\n\nSystem-wide:\n\n```\n$ just install\n```\n\nUser:\n\n```\n$ just install ~/.local\n```\n\n## Running just\n\n```\n$ justin --workspace . just ...\n$ justin --workspace . --copy just ...\n\n$ justin \\\n -E podman \\\n -F ci\n -w . \\\n -v ./artifacts:/artifacts\\\n just -f ci.justfile somestage\n```\n\n## Building images\n\nDefault image:\n\n```\n$ justin build \n```\n\n### Flavors\n\n```\n$ justin --flavor minimal build\n$ justin --flavor ci build\n$ justin -F /path/to/my/flavor build\n```\n\njustin supports a concept of \"flavors\", which is a way to customize how\nimages are built. justin ships with the following flavors:\n\n- `minimal` (default one) - creates a minimal image viable for running just\n commands.\n- `ci` - creates a bigger image with some tools preinstalled, more suitable\n for continuous integration systems.\n\nYou may also point justin to a the directory with a custom flavor, which\nis located outside of the original build context. justin will copy and\nuse your flavor.\n\nDuring build flavors are copied to /install directory within a built\ncontainer.\n\nFlavors have the following requirements:\n\n- they must provide a Flavor Configuration File (see below)\n- inside a flavor directory there must be an `install` directory, which will\n be copied into `/install` within the container, but which will be removed\n from the final image\n- they must provide an executable `/install/install.sh`\n- they must install `/usr/bin/tini` and `just` executables within the\n container\n- they must provide `/usr/local/bin/docker-entrypoint` executable within the\n container, which will be used as container entrypoint\n\n### Flavor Configuration File\n\nEach flavor must provide a `flavor.toml` file with `[build.args]` section.\nEach field from the `[build.args]` section will be used as a `--build-arg`\nduring the build. In case of name conflicts between build args in flavor.toml\nand `--build-arg` passed in command line, command line ones have priority.\n\nExample:\n\n```toml\n[build.args]\nFROM_IMAGE = \"debian\"\nFROM_TAG = \"trixie-slim\"\n\nVENDOR = \"John Doe's Company\"\nAUTHORS = \"John Doe\"\nVERSION = \"1.0\"\nARCH = \"x86-64\"\nDESCRIPTION = \"One image to rule them all\"\nJUST_EXECUTABLE = \"just\"\n```\n",
"bugtrack_url": null,
"license": "GPL-3.0-only",
"summary": "Runner for 'just' commands inside a container",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://git.goral.net.pl/gws/justin.git/about",
"Homepage": "https://git.goral.net.pl/gws/justin.git/about",
"Repository": "https://git.goral.net.pl/gws/justin.git"
},
"split_keywords": [
"just"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "985614d9fdff708088093c499285cdad748ff2f4a089f1aaceb5f61f9c2f9b63",
"md5": "751236c6eb2cf9996dc67e4b9be3e761",
"sha256": "3b4f636999bcb34bbe8e727b18d3c9a164b44b434f9a1569ec223f180578b00b"
},
"downloads": -1,
"filename": "justin_runner-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "751236c6eb2cf9996dc67e4b9be3e761",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 24671,
"upload_time": "2024-04-29T22:51:44",
"upload_time_iso_8601": "2024-04-29T22:51:44.973813Z",
"url": "https://files.pythonhosted.org/packages/98/56/14d9fdff708088093c499285cdad748ff2f4a089f1aaceb5f61f9c2f9b63/justin_runner-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d37fc3d594c9a8a2f09f018e7b2e4e08d36e98e62d5a94a614c8631e00ad1c0a",
"md5": "1c62b05091b9e81f867c8aa90d484996",
"sha256": "7e519c801c1576b5d5399fa4ccfe1f2b096007d832dbce589a59a6319acab75a"
},
"downloads": -1,
"filename": "justin_runner-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "1c62b05091b9e81f867c8aa90d484996",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 22474,
"upload_time": "2024-04-29T22:51:46",
"upload_time_iso_8601": "2024-04-29T22:51:46.977619Z",
"url": "https://files.pythonhosted.org/packages/d3/7f/c3d594c9a8a2f09f018e7b2e4e08d36e98e62d5a94a614c8631e00ad1c0a/justin_runner-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-29 22:51:46",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "justin-runner"
}