Skip to content

[TASK] Tell agents to keep files that a test and a service share out of /tmp - #634

Draft
Kanti wants to merge 1 commit into
webdevops:masterfrom
andersundsehr:task/agents-image-test-files
Draft

Kanti wants to merge 1 commit into
webdevops:masterfrom
andersundsehr:task/agents-image-test-files

Conversation

@Kanti

@Kanti Kanti commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The first CI run of #632 failed in all php images, although the same image test passed locally: a worker of PHP-FPM created a log file in /tmp as application, and the PHP CLI, run as root by docker exec, could not append to it. The runners of GitHub Actions set fs.protected_regular, under which even root may not open a file of another user in a sticky directory such as /tmp with O_CREAT; many local Docker hosts do not set it.

AGENTS.md now tells agents to put such a file in /app, which belongs to application and is not sticky.

Changes

  • AGENTS.md, "Build and test": one bullet after make test-image: a file that a service writes as application and a command of the test writes as root belongs in /app, not in /tmp, and why.

No image changes.

How it was verified

From #632, on php-nginx:8.5 and php-nginx:8.5-alpine with a file that PHP-FPM creates first and the CLI then appends to, as root:

Host setting File in /tmp File in /app
fs.protected_regular=0 (as on the Docker host of the check) both messages both messages
fs.protected_regular=2 (as on the runners) only the message of PHP-FPM; the CLI writes its message to stderr both messages

The CI run of #632 with the file in /app is green.

…of /tmp

The runners of GitHub Actions set fs.protected_regular, under which even
root may not open a file of another user in a sticky directory such as
/tmp with O_CREAT. An image test that lets PHP-FPM, as application, and a
command run as root by docker exec write the same file there passes on a
Docker host without the setting and fails in the CI, as the first run of
webdevops#632 did.
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant