version: "3"

services: 
  php:
    # Uncomment the next line to use a non-root user for all processes.
    # See https://aka.ms/vscode-remote/containers/non-root for details.
    # user: vscode

    build:
      context: .
      dockerfile: Dockerfile
      args:
        # Update VARIANT to pick a PHP version: 7, 7.4, 7.3
        VARIANT: "7.4"
        INSTALL_NODE: "true"
        NODE_VERSION: "lts/*"
        USER_UID: 1000
        USER_GID: 1000

    volumes:
      - ..:/workspace:cached

    ports:
      # For use with PHP (e.g. `php -S localhost:8080`)
      - "8080:8080"

    # Overrides default command so things don't shut down after the process ends.
    command: sleep infinity

    depends_on:
      - mariadb

  mariadb:
      image: mariadb:10.4
      expose:
          # Expose mariadb port to php service (Access as hostname "mariadb" from within php container)
          - "3306"
      # Uncomment to allow access to mariadb from external tools
      # ports:
      #     - "3306:3306"
      restart: unless-stopped
      environment:
          MYSQL_ROOT_PASSWORD:
          MYSQL_DATABASE: shim_test

version: "3"

services: 
  php:
    # Uncomment the next line to use a non-root user for all processes.
    # See https://aka.ms/vscode-remote/containers/non-root for details.
    # user: vscode

    build:
      context: .
      dockerfile: Dockerfile
      args:
        # Update VARIANT to pick a PHP version: 7, 7.4, 7.3
        VARIANT: "7.4"
        INSTALL_NODE: "true"
        NODE_VERSION: "lts/*"
        USER_UID: 1000
        USER_GID: 1000

    volumes:
      - ..:/workspace:cached

    ports:
      # For use with PHP (e.g. `php -S localhost:8080`)
      - "8080:8080"

    # Overrides default command so things don't shut down after the process ends.
    command: sleep infinity

    links:
      - mariadb

  mariadb:
      image: mariadb:10.4
      expose:
          # Expose mariadb port to php service (Access as hostname "mariadb" from within php container)
          - "3306"
      # Uncomment to allow access to mariadb from external tools
      # ports:
      #     - "3306:3306"
      restart: unless-stopped
      environment:
          MYSQL_ROOT_PASSWORD:
          MYSQL_DATABASE: shim_test

Use links instead of depends_on
Use links instead of depends_on
