OpenAPITools / openapi-generator-cli

A node package wrapper for https://github.com/OpenAPITools/openapi-generator
Apache License 2.0
1.45k stars 153 forks source link

[BUG] Docker build outputting root:root directory/file permissions #647

Open mtraynham opened 2 years ago

mtraynham commented 2 years ago

⚠️ Important Notice

Please differentiate the bug

This repository is not responsible for the actual code generation. If you have problems with the code generation, please open the bug at OpenAPITools/openapi-generator.

Please also check if the bug is already known before you open a new bug.


🐛 Bug Report:

Describe the bug

Docker image generates directory/files with root:root permissions instead of the current user.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run the build using a docker image

Expected behavior

It generates the build using the current user and group.

Screenshots

image

Operation System (please complete the following information):

Package System (please complete the following information):

Additional context

Probably needs an additional Docker parameter when running the build to specify the user and group. https://docs.docker.com/engine/reference/run/#user

docker run --user $(id -u):$(id -g)
Papooch commented 1 year ago

Thank you! This solved our problem where we couldn't revert changes in git for files generated by the openapi-generator docker image.

kasir-barati commented 6 months ago

Facing same issue, did this issue has been addressed or it is still an in-progress issue?