Open tomprince opened 3 years ago
I think the most significant part of solving this is to improve dockerTools
to add a streaming mergeImages
, but the glue can also be improved on the arion side.
The info to do this is already available in the x-arion
field.
examples/full-nixos$ ../../run-arion-quick cat | jq '."x-arion".images'
[
{
"imageExe": "/nix/store/371w0nm23r6a6kmpncz8q5kvqpks74qh-stream-webserver",
"imageName": "webserver",
"imageTag": "5r4gm8i0wfpggzw8bygmzfmsw45arcd3"
}
]
But you don't have to process this information externally. You could write a module instead, that you import at the arion project level (top level of arion-compose.nix). This module can write to config.docker-compose.extended
, so you can extract it with arion cat | jq '."x-arion".loadImagesScript'
. I suppose it would be nice if arion cat
could select the option by itself, so you don't have to worry about jq and the compose file internals.
I'm using arion to build docker-compose configuration for running on a non-nix-based system. I'd like to be able get a single file with all the needed docker images (such as is made be
dockerTools.mergeImages
.I'm currently using:
to build one. (Unfortunately,
mergeImages
doesn't support streamed images, so I needed to reimplementbuildLayerdImage
).