Keeping a Docker Container Open in Docker Compose

I wanted to run a couple of Alpine containers with Docker Compose to test out network communication between them. But the containers immediately exited after starting because there was nothing running on them. I needed the equivalent of running docker run -it alpine but in Docker Compose. I found two ways of doing this. git The first is to use stdin_open: true in the Docker Compose file. The…