Run a container named blue-app using image kodekloud/simple-webapp and set the environment variable APP_COLOR to blue . Make the application available on port 38282 on the host. The application listens on port 8080 .
for this task
i am using cmd as
docker run -d -p -e 38282:8080 ALL_COLOR=‘blue’ kodekloud/simple-webapp but it is not working.
You should give the value for a command-line flag immediately after you write the flag. So -p 38282:8080 -e ALL_COLOR=blue instead of -p -e 38282:8080 ALL_COLOR=‘blue’
The full command is then:
docker run -d -p 38282:8080 -e ALL_COLOR=blue kodekloud/simple-webapp
This did not work for me, all checks came back wrong. After further googling, I found this syntax and it worked: docker run -p 38282:8080 --name blue-app -e APP_COLOR=blue -d kodekloud/simple-webapp