A
A
Architecktor133472018-11-04 18:04:54
PHP
Architecktor13347, 2018-11-04 18:04:54

How to create files from docker to access them on the host?

I work through docker-compose. I go into the container, run php artisan make:job SomeJob, the file is created from under the root. How can I make the generated files non-root and editable on the host?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sanes, 2018-11-04
@Sanes

Run the command as the user who owns the laravel files.

V
Vladislav Klimanov, 2018-11-04
@ahmpro

You can run containers as the desired user via the user parameter (can be specified in docker-compose.yml)
https://docs.docker.com/engine/reference/run/#user

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question