Container isn't built

I am new to Docker and am trying to add phpmyadmin to my docker-compose.yaml file. When I run docker-compose up the pma container is never built. What am I missing?

Here is my Dockerfile:

networks:
  laravel:

services:
  app:
    build:
      context: ./dockerfiles
      dockerfile: nginx.dockerfile
      args:
        - UID=${UID:-1000}
        - GID=${GID:-1000}
    ports:
      - "80:80"
    volumes:
      - ./src:/var/www/html:delegated
    depends_on:
      - php
      - redis
      - mysql
      - mailhog
      - pma
    networks:
      - laravel


  mysql:
    image: mariadb:10.6
    volumes:
      - ./mysql:/var/lib/mysql
    restart: unless-stopped
    tty: true
    ports:
      - "3306:3306"
    environment:
      MYSQL_DATABASE: homestead
      MYSQL_USER: homestead
      MYSQL_PASSWORD: secret
      MYSQL_ROOT_PASSWORD: secret
      SERVICE_TAGS: dev
      SERVICE_NAME: mysql
    networks:
      - laravel

  php:
    build:
      context: ./dockerfiles
      dockerfile: php.dockerfile
      args:
        - UID=${UID:-1000}
        - GID=${GID:-1000}
    ports:
      - "9000:9000"
    volumes:
      - ./src:/var/www/html:delegated
    networks:
      - laravel


  redis:
    image: redis:alpine
    restart: unless-stopped
    ports:
      - "6379:6379"
    networks:
      - laravel


  composer:
    build:
      context: ./dockerfiles
      dockerfile: php.dockerfile
      args:
        - UID=${UID:-1000}
        - GID=${GID:-1000}
    volumes:
      - ./src:/var/www/html
    depends_on:
      - php
    entrypoint: [ 'composer', '--ignore-platform-reqs' ]
    networks:
      - laravel


  npm:
    image: node:current-alpine
    volumes:
      - ./src:/var/www/html
    ports:
      - "3000:3000"
      - "3001:3001"
      - "5173:5173"
    working_dir: /var/www/html
    entrypoint: [ 'npm' ]
    networks:
      - laravel


  artisan:
    build:
      context: ./dockerfiles
      dockerfile: php.dockerfile
      args:
        - UID=${UID:-1000}
        - GID=${GID:-1000}
    volumes:
      - ./src:/var/www/html:delegated
    depends_on:
      - mysql
    entrypoint: [ 'php', '/var/www/html/artisan' ]
    networks:
      - laravel

  mailhog:
    image: mailhog/mailhog:latest
    ports:
      - "1025:1025"
      - "8025:8025"
    networks:
      - laravel

  pma:
    image: phpmyadmin/phpmyadmin:latest
    restart: unless-stopped
    ports:
      - "8081:80"
    environment:
      PMA_PORT: 3306
      PMA_HOST: mysql
      PMA_USER: homestead
      PMA_PASSWORD: secret
    depends_on:
      - mysql
    networks:
      - laravel

Please, format your post according to the following guide: How to format your forum posts
In short: please, use </> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.

Example code block:

```
echo "I am a code."
echo "An athletic one, and I wanna run."
```

After fixing your post, please send a new comment so people are notified about the fixed content.


Thanks! It’s been reformatted. Appreciate the help!

So when you run docker compose up the first time, the images are built, but only the images that were not built before. Unless you sppecifically use either

docker compose build

or

docker compose up -d --build