Jus new to Dockers and in the process of learning docker-compose. Using Centos8. Created a dir and all files within the directory will have 755 as the permissions. Creating files:
However, when I start the docker-compose up, it fails by exiting the webapp. Any insights pls, the failure is as below:
CodePudding user response:
can you trying adding following to your web: after ports:? if stdin_open doesn't work, try stdin
stdin_open: true
tty: true
CodePudding user response:
The docker image shuts down as soon as it finishes running the command CMD["python", "webapp.py"]
To keep the container running add the below line in your Dockerfile
ENTRYPOINT ["tail", "-f", "/dev/null"]