Your Location is: Home > Linux

Dockerfile - Create user

From: Iraq View: 2639 Arthur 


I am trying to create a user inside Dockerfile. I have .env file with simple content


For some reason the following command is working

RUN       useradd -ms /bin/bash user

And this one did not

RUN       useradd -ms /bin/bash $USER

How can I solve this? I have the env file inside my docker-compose.yml file

      - .env

Best answer