I think I want to have Docker RUN something which I know will fail, but then use a repair to fix it up, i.e.
RUN dpkg -i wkhtmltox_0.12.6-1.focal_arm64.deb
RUN apt-get update
RUN apt fix-broken install
It seems that apt
recognises that wkhtmltox
failed to install due to missing packages and is then able to install them all. …I think.
Anyway, even trying this means allowing the Docker build to continue upon a bad exit code.
Can I do that?
2
Answers
Here is the solution:
You may really want a few improvements in addition to just getting this working!
dpkg
successfully brought in the packageapt-get
instead ofapt
to avoid the stable interface warningapt
commands in the same block withclean
at the end to reduce container size