I think you are getting tripped by the fact that UIDs in the container live in a world unto themselves.
The user running Discoruse is “discourse” but since this discourse user does not exist at all on the host, on the host the UID will map to the user on the host with the same UID.
To circumvent this weird we could possibly dedicate a range of UIDs in both host and image and have launcher take care of creating parity.