diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..6d2bc491fb8952aee44dcbd19a732cd5c25b8b9b
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,27 @@
+image: $CONTAINER_TEST_IMAGE
+
+variables:
+  CONTAINER_TEST_IMAGE: gitlab-registry.mpcdf.mpg.de/$CI_PROJECT_PATH:$CI_BUILD_REF_NAME
+  OMP_NUM_THREADS: 1
+  GIT_SUBMODULE_STRATEGY: recursive
+
+stages:
+  - build_docker
+  - test
+
+build_docker:
+  image: docker:stable
+  stage: build_docker
+  script:
+    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab-registry.mpcdf.mpg.de
+    - docker build -t $CONTAINER_TEST_IMAGE .
+    - docker push $CONTAINER_TEST_IMAGE
+
+tests:
+  stage: test
+  script:
+    - cd nifty && python3 setup.py install --user -f && cd ..
+    - for file in *.py; do python3 $file; done
+  artifacts:
+    paths:
+      - '*.png'
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000000000000000000000000000000000000..c0f61fa46141db4d12f4627fdb7268d9eaca0757
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,16 @@
+FROM debian:testing-slim
+
+ENV DEBIAN_FRONTEND noninteractive
+
+RUN apt-get update && apt-get install -y \
+    # Needed for setup
+    git python3-pip \
+    # Packages needed for NIFTy
+    python3-scipy \
+    # Optional NIFTy dependencies
+    python3-matplotlib \
+  && pip3 install git+https://gitlab.mpcdf.mpg.de/mtr/pypocketfft.git \
+  && rm -rf /var/lib/apt/lists/*
+
+# Set matplotlib backend
+ENV MPLBACKEND agg
\ No newline at end of file