Comments (2)
@rodnymolina, I resolved it with the second option which you gave, thank you so much.
from sysbox-ee.
@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:
- Make use of a docker-image that doesn't rely on Systemd.
or ...
- Place your init command within a Systemd unit file.
from sysbox-ee.
Related Issues (11)
- ubuntu 19.04 server: runtime not found HOT 3
- How to limit resources on a system container? HOT 4
- Shiftfs module not present in Ubuntu Cloud Images HOT 11
- Error when pulling openjdk images HOT 5
- connection refused after running docker with sysbox-runc HOT 5
- License HOT 3
- Bind mount of `/run` or `/var/run` into container causes host network to become unresponsive HOT 13
- Unsupported linux distribution: Pop!_OS 20.04 HOT 1
- proc-sys-fs-binfmt_misc.automount: Failed to initialize automounter: Operation not permitted HOT 4
- Issues running a Rancher container inside a Sysbox container HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sysbox-ee.