i trying to pass user group ID from my Linux environment to Dockerfile throught docker-compose. I know about about "args" in docker-compose.yml, but i need to find method for getting group id by executing shell commang "getent group mygroup | cut -d: -f3". This is a mandatory requirement, because then the container will be distributed in different environments where the name of the group is known, and the id will be different.
Here is what i talking about:
version: '3.3'
services:
...
php:
build:
context: './php-fpm'
args:
- GROUP_ID=<HERE I NEED TO GET SHELL COMMAND RESULTS>
container_name: php-fpm
...
Is any methods to do that?