Giter VIP home page Giter VIP logo

Comments (4)

krallin avatar krallin commented on August 19, 2024

On CentOS 6, /sbin/init is Upstart. Upstart is a init system and as such it expects to be running as PID 1. In particular, see this message from /sbin/init --help:

This daemon is normally executed by the kernel and given process id 1 to denote
its special status.  When executed by a user process, it will actually run
/sbin/telinit.

So, when you start Upstart using Tini, it's not running as PID 1 (Tini is), so instead of starting Upstart, /sbin/init tries to run telinit, which is used to send messages to Upstart. Obviously, that fails, because Upstart isn't running.

Taking a step back, using Tini to start Upstart is probably not what you want to be doing. Tini is a minimal init system, designed for cases where you don't want to run a full-blown init system like Upstart. If you actually want to run to be running a full-blown init system, then just don't using Tini to start it.

Cheers,

from tini.

KevinTHU avatar KevinTHU commented on August 19, 2024

@krallin thank you for your help, I think maybe I need to amend the image, using /sbin/init is really not what should be done in docker container. But BTW, I have been using --init for dockerd, could I run a container without Tini?I don't see the method in docker docs. I think the parameter for '--init false' is needed maybe for docker run~

from tini.

krallin avatar krallin commented on August 19, 2024

I think maybe I need to amend the image, using /sbin/init is really not what should be done in docker container.

Indeed, that's why Tini exists 😄

could I run a container without Tini?

You can leave out the --init flag to do so.

from tini.

KevinTHU avatar KevinTHU commented on August 19, 2024

You can leave out the --init flag to do so.

In our environment, most contianer need tini, using '--init' for dockerd is a easy way to make sure every container is running with tini. but maybe some containers don't need tini or should not use tini, it's a little awkward for us, of cause this is not a common situation, hope better to have it^_^.

from tini.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.