We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The advice of creating such an alias in the README is really good and works well:
alias textql='docker run --rm -it -v $(pwd):/tmp textql '
but the problem with it is that it runs textql as root and so the output files are created with that user.
textql
Ideally, the solution would be to use this command instead:
alias textql='docker run --rm --user $(id -u):$(id -g) -it -v $(pwd):/tmp textql '
which works fine when called like this
textql (...usage shown...)
but not when an actual SQL processing is requested:
textql -sql 'SELECT * FROM groups LIMIT 2' groups.csv 2019/02/12 07:26:44 user: unknown userid 1000
Is there a way to fix that?
The text was updated successfully, but these errors were encountered:
@xi-ao Perhaps the change can be as simple as adding a new user in the dockerfile like RUN useradd app USER app
RUN useradd app
USER app
and then you can run docker run --rm -u app:app -it -v $(pwd):/tmp textql -header -sql "select count() from test" test.csv
docker run --rm -u app:app -it -v $(pwd):/tmp textql -header -sql "select count() from test" test.csv
Let me if this solution looks good to you. I can open a PR.
Sorry, something went wrong.
No branches or pull requests
The advice of creating such an alias in the README is really good and works well:
but the problem with it is that it runs
textql
as root and so the output files are created with that user.Ideally, the solution would be to use this command instead:
which works fine when called like this
but not when an actual SQL processing is requested:
Is there a way to fix that?
The text was updated successfully, but these errors were encountered: