OK after MANY hours back and forth trying to get this to work I have identified the issue and am posting it here for any others that might get stuck like I did.
The MySQL docker container is version 8, this means for some reason the mariadb library that the MySQL template draws in doesn’t work.
I did not include the MySQL template file in the import docker container config file, this was the first change.
I built the import container, entered into it with ./launcher enter import
echo "gem 'mysql2'" >> Gemfile
dpkg -i mysql-apt-config_0.8.17-1_all.deb
This has an interactive prompt and you can select the defaults (MySQL 8 with tools)
Then I installed the normal MySQL 8 library and continued the build:
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y libmysqlclient-dev
su discourse -c 'bundle config unset deployment'
su discourse -c 'bundle install --no-deployment --path vendor/bundle --jobs 4 --without test development'
Once this was all done the rest was the same, the import is now running.
The Discourse devs may want to adjust the import scripts to account for this, at least it’s now on the forums for others to see if they get stuck like I did.