diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index be532db66d332bbabbab3d820ef16fe5ed90b58a..0777d82567347b030c1b26ab4468b4a627651ae2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -32,7 +32,7 @@ build_webservice:
     - ./build.sh ${REGISTRY}
 
 test_maxima:
-  image: moodlehq/moodle-php-apache:7.3
+  image: "$REGISTRY/moodle-ci-stack"
   stage: test_maxima
   services:
   - postgres:latest
diff --git a/testimage.sh b/testimage.sh
index d3dd38ce702263c8ca90a62108a88300ebf74ed8..65b900a231dd58a9bff997e9bb48ae738fee1ebe 100644
--- a/testimage.sh
+++ b/testimage.sh
@@ -1,16 +1,4 @@
 #!/bin/bash
-apt-get update -y && apt-get install -y git-core postgresql-client texinfo maxima maxima-share
-curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
-. $HOME/.nvm/nvm.sh
-nvm install 14
-nvm use 14
-curl -sS https://getcomposer.org/installer | php
-mv composer.phar /usr/local/bin/composer
-composer create-project -n --no-dev --prefer-dist blackboard-open-source/moodle-plugin-ci ci ^2
-export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH"
-chmod u+x ci/bin/moodle-plugin-ci
-chmod u+x ci/bin/*
-umask u+x
 git clone --branch "$QSTACK_VERSION" https://github.com/maths/moodle-qtype_stack
 moodle-plugin-ci add-plugin maths/moodle-qbehaviour_dfexplicitvaildate
 moodle-plugin-ci add-plugin maths/moodle-qbehaviour_dfcbmexplicitvaildate