diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 44c192eda598c81bd26640c0a1a580be1322f1b0..d8f2bf1352e4dd89b5f83ba9e9391473c24587bf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -72,7 +72,7 @@ format:
     - docker login -u $CI_USER_NAME -p $GITLAB_ACCESS_TOKEN $CI_REGISTRY
   script:
     #- docker run -v $(pwd):/project $CI_REGISTRY/r3/docker/julia-custom --project=@. -e 'using JuliaFormatter; format(".", verbose=true);'
-    - if [[ $(git status -s | wc -l) -gt 0 ]]; then
+    - if [[ $(docker run -i -v $(pwd):/git alpine/git status -s | wc -l) -gt 0 ]]; then
         GITHUB_COMMENT="There are files that need formatting.";
       else
         GITHUB_COMMENT="All files are formatted properly :white_check_mark:";