DEV Community

Discussion on: Specifying user and group in Docker

Collapse
 
grekpg profile image
grekpg

when i add

php:
build: ./docker/php-fpm
user: "${UID}:${GID}"

i get

WARNING: The UID variable is not set. Defaulting to a blank string.
WARNING: The GID variable is not set. Defaulting to a blank string.

Collapse
 
acro5piano profile image
Kay Gosho

I have seen that warnings. Did you set Docker user though?

Collapse
 
varunbatrait profile image
Varun Batra

Hi, You didn't set UID and GID first. Set those variable by either creating a bash - or set it zshrc file (or alike)