diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b894e93aeb8482debb1189393dcfb367b19c8d1b..e411c9223a0ec1039fefc65f7e5a776a11410380 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,17 +1,32 @@
-image: debian:trixie
-
 variables:
   DEBIAN_FRONTEND: noninteractive
+  IMAGE_NAME:      $CI_REGISTRY_IMAGE/base
 
 stages:
+  - docker
   - install
   - test
 
+docker:
+  stage: docker
+  tags:
+    - dind
+  variables:
+    DOCKER_DRIVER:      "overlay2"
+    DOCKER_TLS_CERTDIR: "/certs"
+  services:
+    - docker:20.10.17-dind
+  before_script:
+  - docker info
+  - docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
+  script:
+  - docker build -t ${IMAGE_NAME}:latest .
+  - docker push ${IMAGE_NAME}:latest
+  image: docker:20.10.17
+
 install:
   stage: install
-  before_script:
-  - apt-get update && apt-get install --no-install-recommends -y python3 python3-virtualenv
-  - ln -s /usr/bin/python3 /usr/bin/python
+  image: ${IMAGE_NAME}:latest
   script:
   - virtualenv --python=/usr/bin/python3 .
   - source bin/activate
@@ -25,14 +40,12 @@ install:
 
 test_ppparis:
   stage: test
+  image: ${IMAGE_NAME}:latest
   needs: [install]
-  before_script:
-  - apt-get update && apt-get install --no-install-recommends -y python3 python3-virtualenv chromium-driver make xauth xvfb tesseract-ocr tesseract-ocr-eng tesseract-ocr-fra ocrmypdf curl unzip
-  - ln -s /usr/bin/python3 /usr/bin/python
+  script:
   - curl --location --output artifacts.zip "${CI_SERVER_PROTOCOL}://${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/${CI_PROJECT_ID}/jobs/artifacts/${CI_COMMIT_BRANCH}/download?job=${CI_JOB_NAME}&job_token=${CI_JOB_TOKEN}" || true
   - unzip artifacts.zip data/ppparis/* || true
   - rm artifacts.zip || true
-  script:
   - source bin/activate
   - python ./ppparis.py
   retry: 2
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000000000000000000000000000000000000..95efbb9b3da373b0f1e513dee2a6bb9057925078
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,10 @@
+FROM debian:trixie
+
+ENV DEBIAN_FRONTEND="noninteractive"
+
+RUN apt-get update && \
+	apt-get dist-upgrade -y && \
+	apt-get install --no-install-recommends -y python3 python3-virtualenv chromium-driver make xauth xvfb tesseract-ocr tesseract-ocr-eng tesseract-ocr-fra ocrmypdf curl unzip && \
+	apt-get clean && \
+	rm -rf /var/lib/apt/lists && \
+	ln -s /usr/bin/python3 /usr/bin/python