Docker
The Docker image aux4/aux4 is based on Ubuntu, and it contains pkgx installed.
1> docker run --rm -v <ABSOLUTE PATH TO YOUR .aux4 FILE>:/home/aux4/.aux4 -it aux4/aux4 <ARGS>You have to create a volume to your .aux4 file, otherwise it won't have your custom commands.
The container will be removed after the execution. If you want to keep it, feel free to remove the --rm parameter.
Example
Create your .aux4 file.
1{
2 "profiles": [
3 {
4 "name": "main",
5 "commands": [
6 {
7 "name": "hello",
8 "execute": [
9 "echo Hello ${name}"
10 ],
11 "help": {
12 "text": "say hello",
13 "variables": [
14 {
15 "name": "name",
16 "text": "the name to say hello"
17 }
18 ]
19 }
20 }
21 ]
22 }
23 ]
24}Run it on Docker:
1> docker run --rm -v $(pwd)/.aux4:/home/aux4/.aux4 -it aux4/aux4 hello --name "John Doe"1Hello John Doeaux4/docker Package
An easier option is to use the aux4/docker package, which wraps the raw docker run invocation above into a plain aux4 command:
1> aux4 aux4 pkger install aux4/docker1> aux4 aux4 docker run hello --name "John Doe"1Hello John DoeIt mounts the current directory by default, so no manual volume flags are needed — pass --hostVolume/--volume to change that, or --image to run against a different image than aux4/aux4.
aux4 aux4 docker test <command> follows the same pattern, running against the aux4/test image instead of aux4/aux4 — useful for running a .test.md suite in an isolated container.
Building your own aux4-based Docker image (bundling a package as a standalone container) is available through aux4 aux4 docker build — see aux4 aux4 docker build --help for the available options.