diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 25f9ec16931bd3fac44ccf7c3a897b5638c944e2..8d86355c96b32077e5e5adef2c4a75ddc2afdb78 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,6 +8,7 @@ stages:
 
 test_build_script:
   stage: test_pre_build
+  image: koalaman/shellcheck-alpine:latest
   script:
     - shellcheck ./scripts/build.sh
 
diff --git a/scripts/build.sh b/scripts/build.sh
index 5fd1ead8b77867c4b7aa1e4e239e311a16b91ccf..9c7a98c9ee090972f96ce0420aa63e0408cba56b 100644
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -51,9 +51,9 @@ git clone -q --recursive --depth 1 https://github.com/nginx/nginx.git -b "$NGINX
 # Configure nginx
 echo ""
 echo "CONFIGURE NGINX"
-cd "$NGINX_SRC_DIR/auto" || exit
+cd "$NGINX_SRC_DIR" || exit
 
-./configure \
+.auto/configure \
     --prefix=/etc/nginx \
     --sbin-path=/usr/sbin/nginx \
     --conf-path=/etc/nginx/nginx.conf \