First of all, I know that running Apache as root is highly not recommended or as most says "Extremely Dangerous". However, what I am working on is simply a development container and will not be used on any production. To summarize, I am currently working with WordPress and I am having trouble with plugin and theme installations and other stuff due to permissions as any volume mount directory is owned by root and change owner doesn't work. I think it's a known issue with docker. And to access and retain my codes I have to mount the wp-content as it is where the plugins and themes are located. I tried to update the envvars and set the user and group to root but I somehow met the following error:
Try to search anywhere in the internet but could not find any resource on adding CFLAGS. I tried adding it on the dockerfile then also via --build-args still no luck. Any one got any idea how to set the CFLAGS or have tried running there apache as root on docker.