Closed dpprdan closed 6 months ago
In general, I think that it is assumed that the processing that depends on the files in the repository will be handled by the lifecycle scripts. https://containers.dev/implementors/json_reference/#lifecycle-scripts
Alternatively, we can use the COPY
clause in the Dockerfile to copy the file and reference it at build time, but this is not ideal because it means that we have to redo the build every time we update the contents of the repository.
Like this:
https://github.com/mamba-org/devcontainer-features/tree/main/src/micromamba#create-a-new-environment-with-the-envfile-option
Wild examples I have: https://github.com/eitsupi/prqlr/blob/9284c2d11a3c8115067d4b1031ccfeb355185385/.devcontainer/devcontainer.json#L37-L39 https://github.com/eitsupi/querying-with-prql/blob/4dcdfd6b58d7860ae6d29f9299ef1175f309061e/.devcontainer/devcontainer.json#L22-L26
I believe this can be accomplished by using lifecycle scripts set by the Feature. I would like this functionality and will try to implement it.
This is a completely different behavior from the existing r-packages
feature and should probably be implemented as a separate Feature.
@dpprdan Could you try https://github.com/rocker-org/devcontainer-features/tree/main/src/r-dependent-packages?
@eitsupi Sorry, I haven't been able to try this out yet and will not for another two weeks. But definitely looking forward to it and will do it ASAP!
Is there a way to install packages from a
DESCRIPTION
file in the same repo? This would help to DRY, i.e. not having to specify dependencies in two places, namelyDESCRIPTION
anddevcontainer.json
Specifying
deps::.
like this does not seem to work:I assume this is because
DESCRIPTION
is not yet available in the container when the feature is run?Is there a way to make it available or should what I want be specified differently?