0

I need to start windows docker-compose include keyboard input properties.

I use bat file:

set /p u="user: "
set /p p="pass: "
docker-compose up  

and include docker-compose.yml:

environment:
      - user=%u%
      - pas=%p%

but it's not working.

How to use keyboard input parameter in docker-compose?

סטנלי גרונן
  • 2,917
  • 23
  • 46
  • 68

1 Answers1

0

try to use it as described below

bat file:

set /p u="user: "
set USER="%u%"
set /p p="pass: "
set PASS="%p%"
docker-compose up 

docker-compose.yml

environment:
 - user=$USER
 - pas=$PASS
Al-waleed Shihadeh
  • 2,697
  • 2
  • 8
  • 22