Help running a legacy version of Concrete in Docker

Would anyone who has a successful docker container running an old Concrete version be willing to share their docker compose file? I am trying to move away from a local WAMP/LAMP setup but can’t get Docker to work for me. I need to use PHP 5.6.40 (in the process of upgrading a site version 8.2.1). When I do a docker compose up --build I get the following PHP error:

Fatal error: Uncaught Error: Undefined constant "Patchwork\Utf8\MB_OVERLOAD_STRING" in /var/www/html/concrete/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup.php:45 Stack trace: #0 /var/www/html/concrete/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup.php(26): Patchwork\Utf8\Bootup::initMbstring() #1 /var/www/html/concrete/bootstrap/start.php(19): Patchwork\Utf8\Bootup::initAll() #2 /var/www/html/concrete/dispatcher.php(31): require('/var/www/html/c...') #3 /var/www/html/index.php(3): require('/var/www/html/c...') #4 {main} thrown in /var/www/html/concrete/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup.php on line 45

This is my docker compose file:

version: '4'
services:
  www:
    image: php:apache
    volumes:
      - "./:/var/www/html"
    ports:
      - "80:80"
      - "443:443"
  legacy-php:
    depends_on:
      - mysql
    image: php:5.6.40-apache
    volumes:
      - .:/var/www/html
  mysql:
    image: mysql/mysql-server:5.7.37
    environment:
      - MYSQL_DATABASE=removed
      - MYSQL_USER=removed
      - MYSQL_PASSWORD=removed
      - MYSQL_ALLOW_EMPTY_PASSWORD=1
    volumes:
      - "./db:/docker-entrypoint-initdb.d"
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    ports:
      - "8001:80"
    environment:
      - PMA_HOST=db
      - PMA_PORT=3306

This might help:

@wilfordbrimley The error seems to be happening because PHP version is more likely 8.x

Your www service is using php:apache. This is probably loading the latest version of PHP.

You won’t need legacy-php. You just want to use php:5.6.40-apache as www.

Anyway… as Evan said, if it’s for local dev docker environment, you can use Docker5