Docker compose 1


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