Official Wordpress image crash when used with Compose

Hello hello, I’m trying to run Wordpress with a simple config here

version: '3'

services:
  wordpress:
    image: wordpress
    depends_on:
      - db
    ports:
      - 8080:80
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: root
      WORDPRESS_DB_PASSWORD: root
      WORDPRESS_DB_NAME: wordpress
    volumes:
      - ./root:/var/www/html
      - ./themes:/var/www/html/wp-content/themes
      - ./plugins:/var/www/html/wp-content/plugins

  db:
    image: mariadb
    restart: always
    environment:
      MYSQL_DATABASE: wordpress
      MYSQL_ROOT_PASSWORD: root
    volumes:
      - database:/var/lib/mysql

volumes:
  database:

When I run docker-compose up, the Wordpress container immediately crash with this error

wordpress_1  | sed: can't read wp-config-sample.php: No such file or directory
wordpress-docker_wordpress_1 exited with code 2

As I mounted the whole folder for debug, I can totally see that wp-config-sample.php does exist.

Any idea what I could be missing?