I have a docker image where I install several packages using the following line:
RUN install2.r --error \\ glmnet \\ ineq \\ ...
Howe