Tekki / docker-mojolicious

:whale: Docker image for Mojolicious
Artistic License 2.0
14 stars 3 forks source link

my_app directory structure created as root #3

Closed szabgab closed 3 years ago

szabgab commented 3 years ago

Running

docker container run --rm -v "$(pwd):/usr/src/app" tekki/mojolicious mojo generate app MyApp

created all the my_app directory structure owned by root (Linux host).

Is this the expected behaviour is my Docker misconfigured? Is there a way to create the files owned by the current user in the host, or shall I just chown-them myself?

Tekki commented 3 years ago

created all the my_app directory structure owned by root (Linux host).

That's correct, by default a container created with this image runs a root. We inherit this from docker-perl. If you want to run it with any other user and group ID you can use the -u parameter:

docker container run --rm -u 1024:1099 -v "$(pwd):/usr/src/app" tekki/mojolicious mojo generate app MyApp