Ryan McGrath
Jul 24, 2017 · 1 min read

Wait so my understanding is this build just expands Debian packages without running their install hooks? If this is the case it’s a pretty big “limitation” if your desired outcome is for your container to work. The pre and post hooks for dpkg are pretty complicated, There’s roughly 11 states a package may be in during it’s install lifetime, each state can fire a hook, like prerm as an example. https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html I wouldn’t recommend bypassing this ever. It looks like Bazel supports a shell rule (https://docs.bazel.build/versions/master/be/shell.html), you should probably install dependencies this way if there isn’t a pre-built ubuntu ruleset. Ideally always run installs through apt-get over dpkg directly, as aptitude is a higher level tool (it wraps dpkg) but also handles inter package dependency resolution. dpkg -i will just install the package and may bring dependencies that clash with other dependencies that break your install.