diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9e0bbc1d6b1452717b45a0981adc1e72307c65cb..02335ac076e6527d32ea341b882c8aa0deffd18e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,14 +1,28 @@
 ---
-image: docker:latest
 services:
   - docker:dind
 stages:
+  - lint
   - build
 variables:
   DOCKER_DRIVER: overlay2
   DOCKER_HOST: tcp://docker:2375
 
+.transform-job-name: &transform-job-name
+  before_script:
+    - CI_JOB_NAME="$(echo $CI_JOB_NAME | cut -d - -f 2)"
+    - export CI_JOB_NAME
+
+.lint-dockerfile: &lint-dockerfile
+  image: hadolint/hadolint:latest-debian
+  <<: *transform-job-name
+  script:
+    - hadolint $CI_JOB_NAME
+  stage: lint
+
 .build-docker-image: &build-docker-image
+  image: docker:latest
+  <<: *transform-job-name
   script:
     # Disable bash history to prevent the $CI_JOB_TOKEN to be recorded and saved
     - unset HISTFILE
@@ -21,17 +35,32 @@ variables:
     - rm /root/.docker/config.json
   stage: build
 
-archlinux:
+lint-archlinux:
+  <<: *lint-dockerfile
+
+lint-debian:
+  <<: *lint-dockerfile
+
+lint-fedora:
+  <<: *lint-dockerfile
+
+lint-gentoo:
+  <<: *lint-dockerfile
+
+lint-linting:
+  <<: *lint-dockerfile
+
+build-archlinux:
   <<: *build-docker-image
 
-debian:
+build-debian:
   <<: *build-docker-image
 
-fedora:
+build-fedora:
   <<: *build-docker-image
 
-gentoo:
+build-gentoo:
   <<: *build-docker-image
 
-linting:
+build-linting:
   <<: *build-docker-image
diff --git a/.hadolint.yaml b/.hadolint.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..c29bd05a3b9a4e4e8ebcaf8ca0c6e885e3cd2a6c
--- /dev/null
+++ b/.hadolint.yaml
@@ -0,0 +1,5 @@
+ignored:
+  - DL3006
+  - DL3007  
+  - DL3008
+  - DL3013  
diff --git a/fedora b/fedora
index 4fd8fd58fe0665a4e2eedf24b543133d57945af9..3a5f279025e6c23cb527786a8ad82612f94173ce 100644
--- a/fedora
+++ b/fedora
@@ -1,9 +1,10 @@
 FROM fedora
 
-RUN export FEDORA_VERSION=$(rpm -E %fedora) \
+RUN FEDORA_VERSION="$(rpm -E %fedora)" \
+&&  export FEDORA_VERSION \
 &&  dnf install -y \
-    https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$FEDORA_VERSION.noarch.rpm \
-    https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$FEDORA_VERSION.noarch.rpm \
+    https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-"$FEDORA_VERSION".noarch.rpm \
+    https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-"$FEDORA_VERSION".noarch.rpm \
 &&  dnf update -y \
 &&  dnf install -y \
     cairo \