Open linxpinx opened 1 month ago
If I remember, I encountered a similar problem on my machine quite some time ago.
Are you using Docker or Podman?
Hi Oli, I use https://github.com/abiosoft/colima. But I can try with docker.
Ok i checked it with docker and it works with or without my changes. So I think we can take my changes into the code.
We also have the composer docs:generate command in the composer.json and in the Documentation.rst.
Maybe we can discuss this with the team.
Is the group identifier really needed ?
Literally, instead of adding it dirctly to the command call following check should be investigated:
if [ "$(uname)" != "Darwin" ] && [ "${CONTAINER_BIN}" == "docker" ]; then
# Run docker jobs as current user to prevent permission issues. Not needed with podman.
USERSET="--user $HOST_UID"
fi
First, does the condition not work on your side and leaves USERSET empty ?
I would suggest to add a "DOCUMENTATION_USERSET" here in the condition setting the user along and replace ${USERSET} for the conrainer execution (run) call.
Not sure about the impact doing it in USERSET directly which are used for all container executions. At least should be checked for all if the group is added. In the end, should only target for macos and docker usage (docker command available).
The group is needed otherwise the Rendering Process is not working.
First, does the condition not work on your side and leaves USERSET empty ? yes USERSET is empty cause I have a Mac, so Darwin is true.
I added this in runTests.sh:
if [ "$(uname)" != "Darwin" ] && [ "${CONTAINER_BIN}" == "docker" ]; then
# Run docker jobs as current user to prevent permission issues. Not needed with podman.
USERSET="--user $HOST_UID"
elif [ "$(uname)" == "Darwin" ] && [ "${CONTAINER_BIN}" == "docker" ]; then
USERSET="--user=$(id -u):$(id -g)"
fi
and extend the composer command:
"docs:generate": "docker run --rm --user=$(id -u):$(id -g) -v $(pwd):/project ghcr.io/typo3-documentation/render-guides:latest --progress --config ./Documentation",
and tested the other commands in runTests.sh where USERSET is used, works on Mac and Colima.
Maybe Windows/Linux can tested by someone else.
Please note that for the render-guide repository the entrypoint of the Docker file:
https://github.com/TYPO3-Documentation/render-guides/blob/main/entrypoint.sh#L107
does some "magic" to try unifying the system to work on macos, windows and linux due the specialties of Docker in each of them.
We're open to optimizing this, if anyone has ideas on how it should be done so it works accross all systems without too much if-conditions ;)
(Please note that in https://docs.typo3.org/other/t3docs/render-guides/main/en-us/Installation/Index.html#Setup_Docker we actually have a place that mentions this --user...
command argument. Still, it would be great to somehow detect this properly within the container)
./Build/Scripts/runTests.sh -s docsGenerate
failed on MacBook Pro.Acceptance Criteria
./Build/Scripts/runTests.sh -s docsGenerate
is runningAdditional Information
Errormessage: