Skip to content

Conversation

polmoorx
Copy link
Contributor

@polmoorx polmoorx commented Jul 28, 2025

Merge Checklist

All boxes should be checked before merging the PR

  • The changes in the PR have been built and tested
  • [] cgmanifest file has been updated if required
  • Ready to merge

Description

On EMT OS, when we tried to start Docker, it failed because the default overlay2 storage driver requires a writable, overlay-compatible filesystem, but /var/lib/docker resides under /var, which on EMT OS can be mounted as read-only or which isn’t compatible with overlay operations. This prevented Docker from launching. To fix this, we configured Docker to store its data in /opt/docker-data, a persistent and writable location that supports overlay2, by adding a daemon.json file and updating the RPM spec to create the required directories, install the configuration, and safely migrate any existing data from /var/lib/docker using rsync. With this change, Docker now starts and runs reliably on both RT and non-RT EMT OS, using a stable and compatible storage location.

Any Newly Introduced Dependencies

No

How Has This Been Tested?

Tested manually.

@polmoorx polmoorx requested a review from a team as a code owner July 28, 2025 09:21
@polmoorx polmoorx requested a review from a team as a code owner July 29, 2025 04:19
@polmoorx polmoorx force-pushed the fix-docker-startup-overlay2 branch 2 times, most recently from 6b58436 to 5110a47 Compare July 30, 2025 06:07
@ssinghax ssinghax requested a review from anujm1 July 30, 2025 06:34
@polmoorx polmoorx force-pushed the fix-docker-startup-overlay2 branch 4 times, most recently from ee1ab22 to 34d3f78 Compare August 5, 2025 14:08
@polmoorx polmoorx force-pushed the fix-docker-startup-overlay2 branch 3 times, most recently from 4a3f4e2 to 686f4fa Compare August 13, 2025 05:01
@polmoorx polmoorx force-pushed the fix-docker-startup-overlay2 branch 5 times, most recently from a2838e3 to f720386 Compare September 1, 2025 04:41
@polmoorx polmoorx force-pushed the fix-docker-startup-overlay2 branch from f720386 to e876a84 Compare September 9, 2025 04:05
@polmoorx polmoorx force-pushed the fix-docker-startup-overlay2 branch 2 times, most recently from c4934ed to 46d9f21 Compare September 18, 2025 16:30
Comment on lines +107 to +108
mkdir -p %{buildroot}/opt/docker-data
chmod 0700 %{buildroot}/opt/docker-data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant to line 118-119, where similar mkdir -p /opt/docker-data and chmod 0700 also added there.

@yepmunchun
Copy link
Contributor

Before switching data-root to new location, have you tried to add /var/lib/docker in layout.env's PERSISTENT_BIND_PATHS ?

Added a daemon.json file to set "overlay2" as the storage driver
and moved Docker’s data directory to /opt/docker-data. This change
makes sure Docker starts properly on EMT OS.

Also updated the spec file to install this config and copy any existing
Docker data to the new location.

Signed-off-by: Polmoorx Shiva Kumar <[email protected]>
@polmoorx polmoorx force-pushed the fix-docker-startup-overlay2 branch from 46d9f21 to 9022047 Compare October 17, 2025 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants