docker commandant

version: '3'
services:
  web:
    image: nguyenmanhluu/yii1:1.0
    container_name: dockeryiidisc
    ports:
      - "8082:80"
    build: 
      context: ..
      dockerfile: Dockerfile
      target: dev     
    volumes:
      - ./:/var/www/html       
    command: /bin/sh -c "service apache2 start && while sleep 1000; do :; done"
   
  db:
    container_name: dockeryiimysql
    image: mysql:latest
    volumes:
      - dockeryiimysql:/var/lib/mysql
    ports:
      - "3306:3306"
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: 'true'
      MYSQL_DATABASE: sdi      

  phpmyadmin:  
    container_name: dockeryiipma
    image: phpmyadmin:latest
    environment:
      UPLOAD_LIMIT: 300M
      PMA_ARBITRARY: 1
      APACHE_HTTP_PORT_NUMBER: 8080
    ports:
      - 8080:8080
    command: /bin/bash -c "sed -i \"s/80/$$APACHE_HTTP_PORT_NUMBER/g\" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf && /docker-entrypoint.sh apache2-foreground"

volumes:
  dockeryiimysql: {}
Ramil Huseynov