SUSE Support

Here When You Need Us

Running a container image with docker causes a tmpfs being mounted into the container's filesystem

This document (000021288) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15 SP3 and later

Situation

Starting a container image with Docker results in a tmpfs being created and mounted to /var/lib/docker/containers/SHA256/mounts/secrets:
host:~ # docker run -d --rm registry.k8s.io/e2e-test-images/agnhost:2.39
ce445d41ea060216f7985015d9ba0780aa958a1df4605ca414bcc210b28fd8de
host:~ # mount | grep ce445d4
tmpfs on /var/lib/docker/containers/ce445d41ea060216f7985015d9ba0780aa958a1df4605ca414bcc210b28fd8de/mounts/secrets type tmpfs (ro,relatime,inode64)
host:~ # ls /var/lib/docker/containers/ce445d4*/mounts/secrets/
suse_81696772d781afd0ff3038714a81da303a4b152371ba4854f8d6426317f73ce9_credentials.d
suse_827d94d93c7563d2fefc81254e5233528eccc7781033af071f34d37dbe220488_SUSEConnect
host:~ # docker exec -it ce445d4 /bin/sh
/ # ls /run/secrets/
SUSEConnect     credentials.d/
/ # 

Resolution

Providing SUSE product registration credentials to containers via the tmpfs mount is hard-coded in SUSE builds of Docker and cannot be disabled.

Cause

This mechanism safely provides a container with access to the product registration credentials of the host system. It authorizes zypper to access SUSE Linux Enterprise repositories or patches without further need to adjust the Dockerfile or a Compose file from within the container, provided that the host system is properly registered.

It is implemented with a SUSE specific patch to dockerd. Whether a specific build of Docker has the patch included can be determined by dockerd's start log message

SUSE:secrets :: enabled

(check the output of  "journalctl -u docker")

For podman, the container-suseconnect plugin exists.

As the repository credentials only need a very small amount of RAM, the additional tmpfs mounts should not have any noticeable effect on the system.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021288
  • Creation Date: 06-Dec-2023
  • Modified Date:06-Dec-2023
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.