Search code examples
dockerdockerfileupstart

Dockerfile build fails because PPA requires upstart


I want to install a PPA inside a Dockerfile build. The PPA includes a call to upstart, specifically, the PPA postinst script starts a service then does some other work afterward that requires that the service be running. The Dockerfile build fails because the service is not started.

What apparently is happening is that upstart is replaced by Docker/Moby so that any such calls cannot be run except as an entrypoint. See: Running services (upstart/init.d) in a container

One possible solution is to use the phusion/baseimage but the PPA requires Ubuntu 14.04 and phusion is pegged at Ubuntu 16.

What am I missing?


Solution

  • Docker is not really designed to run upstart/systemd services, it's designed to launch the service directly in foreground.

    If your package depends on upstart, maybe you shouldn't use the package but do a manual installation in your Dockerfile.