title: How to run multiple Python scripts and an executable files using Docker?
body: <p>I want to create a container that is contained with two Python packages as well as a package consist of an executable file.</p>
  <hr />
  <h3>Here's my main package (dockerized_package) tree:</h3>
  <pre><code>dockerized_project
  ├── docker-compose.yml
  ├── Dockerfile
  ├── exec_project
  │   ├── config
  │   │   └── config.json
  │   ├── config.json
  │   ├── gowebapp
  ├── pythonic_project1
  │   ├── __main__.py
  │   ├── requirements.txt
  │   ├── start.sh
  │   └── utility
  │       └── utility.py
  └── pythonic_project2
      ├── collect
      │   ├── collector.py
      ├── __main__.py
      ├── requirements.txt
      └── start.sh
  </code></pre>
  <hr />
  <h3>Dockerfile content:</h3>
  <pre><code>FROM ubuntu:18.04
          
  RUN apt update
  RUN apt-get install -y python3.6 python3-pip python3-dev build-essential gcc \
      libsnmp-dev snmp-mibs-downloader
  
  RUN pip3 install --upgrade pip
  
  RUN mkdir /app
  WORKDIR /app
  COPY . /app
  
  WORKDIR /app/snmp_collector
  RUN pip3 install -r requirements.txt
  WORKDIR /app/proto_conversion
  RUN pip3 install -r requirements.txt
  
  WORKDIR /app/pythonic_project1
  CMD python3 __main__.py
  
  WORKDIR /app/pythonic_project2
  CMD python3 __main__.py
  
  WORKDIR /app/exec_project
  CMD [&quot;./gowebapp&quot;]
  </code></pre>
  <hr />
  <h3>docker-compose content:</h3>
  <pre><code>version: '3'
  
  services:
    proto_conversion:
        build: .
        image: pc:2.0.0
        container_name: proto_conversion
  #      command: 
  #        - &quot;bash  snmp_collector/start.sh&quot;
  #        - &quot;bash  proto_conversion/start.sh&quot;
        restart: unless-stopped
        ports:
          - 8008:8008
        tty: true
  </code></pre>
  <hr />
  <h1>Problem:</h1>
  <p>When I run this project with <code>docker-compose up --build</code>, only the last <code>CMD</code> command runs. Hence, I think the previous <code>CMD</code> commands are killed in <code>Dockerfile</code> because when I remove the last two <code>CMD</code>, the first <code>CMD</code> works well.</p>
  <p>Is there any approach to run multiple Python scripts and an executable file in the background?</p>
  <p>I've also tried with the bash files without any success either.</p>