Giter Site home page Giter Site logo

Comments (2)

sanzenwin avatar sanzenwin commented on June 1, 2024 1

@rodnymolina, I resolved it with the second option which you gave, thank you so much.

from sysbox-ee.

rodnymolina avatar rodnymolina commented on June 1, 2024

@sanzenwin, you are making use of a docker image whose process manager is Systemd, so /sbin/init will always be the first (and only) process that will run during the container initialization. In other words, your instruction /bin/bash -c touch /testfile won't ever have a chance to execute as it will be passed as parameters to the /sbin/init command.

You can confirm this point by doing a ps -ef within your container -- you should see something like this:

admin@117f79d78b75:~$ ps -ef
UID          PID    PPID  C STIME TTY          TIME CMD
root           1       0  0 17:07 ?        00:00:00 /sbin/init --log-level=err /bin/bash -c touch /testfile
root         194       1  0 17:07 ?        00:00:00 /lib/systemd/systemd-journald
root         308       1  0 17:07 ?        00:00:00 /lib/systemd/systemd-udevd
systemd+     397       1  0 17:07 ?        00:00:00 /lib/systemd/systemd-resolved
root         669       1  0 17:07 ?        00:00:00 /lib/systemd/systemd-logind

Please notice that this is not a Sysbox limitation but just a consequence of how Systemd operates. You have two options at this point:

  1. Make use of a docker-image that doesn't rely on Systemd.

or ...

  1. Place your init command within a Systemd unit file.

from sysbox-ee.

Related Issues (11)

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.