You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run with --env START_DOCKER="true" and --privileged the /tmp dir is empty. That is causing that for instance in KDE the systemsettings no longer working with the error DBus session bus not found
Expected Behavior
Without running dind (--env START_DOCKER="false") I can found in /tmp for instance the dbus session and KDE systemsettings are working without problems
Steps To Reproduce
run the container with --env START_DOCKER="false" and --privileged (tested this with webtop-ubuntu-kde)
check /tmp
run sudo /usr/local/bin/dockerd-entrypoint.sh
check /tmp again
I digged deeper and the /usr/local/bin/dockerd-entrypoint.sh is running on the end the command /usr/local/bin/dind dockerd --host=unix:///var/run/docker.sock If you run this command will result also in the empty /tmp
I checked the dind command, it is a shell script and in this script you will find
# Mount /tmp (conditionally)
if ! mountpoint -q /tmp; then
mount -t tmpfs none /tmp
fi
When I run mountpoint /tmp after the container was started I get /tmp is not a mountpoint
Thats the reason why the dind script recreates the /tmp
After creating this issue and thinking through the problem again I searched about tmpfs and /tmp in docker containers and per default (for performance reasons) in a docker container /tmp is a normal directory. But it is possible to change that behavior.
use --tmpfs /tmp in the docker command and /tmp is mounted with tmpfs and this is solving the problem that dind mounts /tmp with tmpfs and overrides the local /tmp
maybe it's a good idea to mention this somewhere in the README.md
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
Is there an existing issue for this?
Current Behavior
If I run with
--env START_DOCKER="true"
and--privileged
the/tmp
dir is empty. That is causing that for instance in KDE thesystemsettings
no longer working with the errorDBus session bus not found
Expected Behavior
Without running dind (
--env START_DOCKER="false"
) I can found in/tmp
for instance thedbus session
and KDE systemsettings are working without problemsSteps To Reproduce
--env START_DOCKER="false"
and--privileged
(tested this with webtop-ubuntu-kde)/tmp
sudo /usr/local/bin/dockerd-entrypoint.sh
/tmp
againI digged deeper and the
/usr/local/bin/dockerd-entrypoint.sh
is running on the end the command/usr/local/bin/dind dockerd --host=unix:///var/run/docker.sock
If you run this command will result also in the empty/tmp
I checked the dind command, it is a shell script and in this script you will find
When I run
mountpoint /tmp
after the container was started I get/tmp is not a mountpoint
Thats the reason why the
dind
script recreates the/tmp
Environment
Docker creation
Container logs
The text was updated successfully, but these errors were encountered: