Skip to content

Add log dir expose, unify SPC_FIX_DEPLOY_ROOT parsing - #930

Merged
crazywhalecc merged 2 commits into
mainfrom
fix/docker-log-expose
Oct 18, 2025
Merged

Add log dir expose, unify SPC_FIX_DEPLOY_ROOT parsing#930
crazywhalecc merged 2 commits into
mainfrom
fix/docker-log-expose

Conversation

@crazywhalecc

Copy link
Copy Markdown
Owner

What does this PR do?

Fix #929

Checklist before merging

If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
If a modification is not involved, please skip it directly.

  • If you modified *.php or *.json, run them locally to ensure your changes are valid:
    • composer cs-fix
    • composer analyse
    • composer test
    • bin/spc dev:sort-config
  • If it's an extension or dependency update, please ensure the following:
    • Add your test combination to src/globals/test-extensions.php.
    • If adding new or fixing bugs, add commit message containing extension test or test extensions to trigger full test suite.

@henderkes

Copy link
Copy Markdown
Collaborator

While we're at it, could we try to use the same user inside a docker container as the host uses?

bin/spc-alpine-docker build bcmath --build-cli
rm -rf source buildroot -> error, needs sudo, because we're not the owner of the files

@crazywhalecc

Copy link
Copy Markdown
Owner Author

Like --user "$(id -u):$(id -g)"?

@henderkes

Copy link
Copy Markdown
Collaborator

Yep

@crazywhalecc

crazywhalecc commented Oct 17, 2025

Copy link
Copy Markdown
Owner Author

Unfortunately there are no simple solution to use $(whoami) current user as mount dir for all docker engines. It depends on docker engine platform and version. Using --user will make docker inside full of permission denied error.

The only perfect option for linux is to restart docker CE as rootless mode. But luckily macOS docker always create mount dir as current user permission.

@henderkes

Copy link
Copy Markdown
Collaborator

Restarting docker-ce in a different mode is not a solution, as it may be running on a host and linux could be a VM without docker installed.

If Docker can't handle it natively, there's a chown at the end, but that would prompt a password and only work if the user has sudo...

@crazywhalecc
crazywhalecc merged commit 15638ce into main Oct 18, 2025
11 checks passed
@crazywhalecc
crazywhalecc deleted the fix/docker-log-expose branch October 18, 2025 04:53
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.

spc-alpine-docker doesn't expose logs

2 participants