We were facing the same problem and I confirm that running (inside the docker container):
chown -R discourse:discourse /var/www/discourse/tmp
Fixed the problem! No restarts were required. The ‘tmp’ directory permissions were assigned to ‘discourse:www-data’ before the owner change. Hope this is something that in the future could be fixed so that this manual action won’t be needed after each rebuild.