Docker compose 1st example


provide command line override for CMD/ENTRYPOINT in the compose yaml file


examples/compose1/docker-compose.yml
version: '3.7'
services:
  one:
    build:
        context: .
        dockerfile: Dockerfile
    entrypoint:
        - tail
        - -f
        - /dev/null
  two:
    build:
        context: .
        dockerfile: Dockerfile
    entrypoint: tail -f /dev/null

examples/compose1/Dockerfile
FROM centos:7
RUN yum install -y less vim which
WORKDIR /opt

cd examples/compose1
docker-compose up