简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM