0

I figure out that many packages installations are calling systemd to start their software. The problem is that if you want to install the software inside a docker, it will make fail the installation. Because by default Debian makes installation fail if there is a failure inside a post-install script.

Elasticsearch team did a workaround for that (I'm not sure they understand that it fixes for docker users). But it's a problem for many packages.

Is there a way to make them work anyway inside a debian/ubuntu docker?

2
  • How about building your app in a docker container that runs systemd? May 23, 2018 at 15:57
  • It's not possible to run systemd, because it can't be start as pid 1 in a docker.
    – Nek
    May 24, 2018 at 9:10

1 Answer 1

1

This is not the answer, there is no good answer as I understand.

But here is what to do:

  1. Install software by yourself
  2. Send a patch to the package maintainer with this correction
systemctl daemon-reload || true
# instead of
systemctl daemon-reload

Whatever is called after systemctl, you should suggest to add || true in case there is this kind of call on post install script of your package. This fixes 2 cases:

  1. It's possible that systemctl is masked.
  2. It's possible systemctl does not work (because it's not started as 1st pid) like in dockers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.