you can remove the ubuntu user, create the container as usual, connect to the terminal with sail root-shell, after that php artisan sail:publish
go to the docker folder on the project's root, and change the docker file, adding this line right after FROM ubuntu:22.04:
RUN userdel ubuntu && groupdel ubuntu || true