Skip to content

How to use docker-compose with GitHub Actions? #27185

Answered by Yanjingzhu
ethanjahn asked this question in Actions
Discussion options

You must be logged in to vote

Glad to hear you in GitHub Community.

Please try to run docker ps -a It will list all containers including exited ones. Based on your docker-compose.yml, it seems that backend container has exited immediately after building the image.

Use jakejarvis/wait-action@master action could not keep container running.

You can try to add next command at the end of your docker file.

CMD tail -f /dev/null

You can refer to this blog.

http://bigdatums.net/2017/11/07/how-to-keep-docker-containers-running/

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@denzuko
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD
6 participants