docker compose hold container code example
Example 1: docker compose keep container running
version: '2'
services:
my-test:
image: ubuntu
command: tail -F anything
Example 2: docker compose service wait for forever
version: '3'
services:
app:
image: node:8
tty: true # <-- This option