How to run a upstart init script using dumb-init?
See original GitHub issueI have an upstart init script called goservice.conf and it’s contents are as follows,
description "test.conf"
start on runlevel [2345]
stop on shutdown
respawn
respawn limit 5 2
script
if [-n "/usr/share/main"]; then
mkdir -p /usr/share/main
fi
exec su --session-command="cd ~/ansible/ ; ./main " root
end script
How to run this file using dumb-init so that , if a child process stops ,it is spawned again? Also does dumb-init provides feature to start and stop child processes like upstart , for example: start <service -name> or stop <service-name>
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Choosing an init process for multi-process containers
In this article I explored pros and cons of some of the options like supervisord, runit, monit, tini/dumb-init, s6 (audience favorite), and tini ......
Read more >Introducing dumb-init, an init system for Docker containers
In this post we introduce dumb-init, a simple init system written in C which we use inside our containers. Lightweight containers have made ......
Read more >rhel6-init - Certified Container Image
It is based on a small container-friendly 'dumb-init' instead of upstart. This container image allows customers to run one or more services in...
Read more >Systemd vs. Docker
Each image author creates his or her own crazy startup script for the ... The issue here is that if you don't run...
Read more >An Init System inside the Docker Container
Suppose you run a web server inside the container which runs bash script. ... A simple init system is to use bash inside...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kanapuliAthavan there are bolt-on container friendly “service managers” which can be used. An example is
runit
. Here’s an example of running a multi-service container with runit.Where
/etc/service
directory contains multiple services like:/etc/service/cron/run
/etc/service/sshd/run
/etc/service/syslog-ng/run
It’s probably obvious but… the above is an example using
dumb-init
andrunit
to start three services inside of a container:cron
,sshd
, andsyslog-ng
.I also do not want dumb-init to become smart-init. The only reason I use dumb-init instead of tini is because of its dead simplicity.
@samrocketman Thanks for the detailed explanation. I think , we can close this issue thread now