service-manager virtual
alpine-base
presently hard depends on openrc
. This makes it difficult to use alpine-base
in settings where one either does not wish to use OpenRC or does not need a service manager at all, such as in a Docker container.
Proposed solution
Introduce a service-manager
virtual, with openrc
providing the highest provides_priority
for the service-manager
virtual and then make alpine-base
depend on the service-manager
virtual.
Other service managers can then also provide the service-manager
virtual, such as main/s6-rc
and testing/dinit
. To be absolutely clear, this request does not involve the endorsement of any specific service-manager
implementation presently in Alpine or proposed for future inclusion in Alpine.
Additionally, it is proposed to add a service-manager-none
package which provides the service-manager
virtual. This can be used for situations where a service manager is not required such as in a Docker container.
Benefits to Alpine
Experimentation with alternative service managers
Some users wish to experiment with alternative service managers, such as main/s6-rc
and testing/dinit
, as well as service managers that have not yet been packaged in Alpine. By virtualizing the service manager, it allows for simplified experimentation with service managers while not conflicting with alpine-base
. Additionally, downstream consumers of Alpine can also experiment with different service managers.
Simplification of Alpine Docker image
Presently the Alpine Docker image attempts to equate alpine-base
without openrc
. If the service-manager
virtual is implemented, then the /etc/apk/world
for the Docker image could simply become:
alpine-base
service-manager-none
Configurability of service manager preference
A key mantra in Alpine is that everything should ultimately be configurable. By making the service manager preference configurable, it brings the service manager preference into alignment with this mantra.