A wrapper that lets you run tasks in containers using runc. It will by default run a specific command in a container with the current working directory mounted in it.
As per runc, you need to create your container images using docker:
$ docker create python:buster
$ docker export [ID FROM ABOVE] > python-buster.tar
Of you can take the image directly:
$ docker save python:buster > python-buster.tar
You then need a config file that maps container images to commands, for example:
{
"images": {
"pythonbuster": {
"rootfs": "/path/to/python-buster.tar",
"tags": ["python3", "python", "buster"]
}
},
"commands": {
"mypython3": {
"image": "pythonbuster",
"mounts": [
"/scratch"
],
"command": "python3"
},
"mysh": {
"image": "pythonbuster",
"mounts": [
"/scratch"
],
"environment": {
"HOST_KEY": "1234ABCD",
"LOG_PATH": "/scratch/logs"
},
"networking": "host",
"command": "bash"
}
}
}
This is currently looked for in /var/ark/config.json
.
The go build process will create fsark
as a binary. You then symlink to this with the name of the command you want it to use from the config file when run:
$ go build
$ sudo cp fsark /usr/local/bin
$ sudo ln -s /usr/local/bin/fsark /usr/local/bin/mypython3