diff --git a/src/docker/build/Dockerfile b/src/docker/build/Dockerfile
index 6faf956f159d1ae5bb739283c106eb2d9ceae269..c2a4425b184734b846fa9cec9a2e9d04fee158a8 100644
--- a/src/docker/build/Dockerfile
+++ b/src/docker/build/Dockerfile
@@ -6,9 +6,8 @@ RUN apt-get update && apt-get install -y wget
 RUN wget https://github.com/jwilder/dockerize/releases/download/v0.2.0/dockerize-linux-amd64-v0.2.0.tar.gz
 RUN tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.2.0.tar.gz
 
-RUN mkdir -p /opt/portal/ \
-    && echo -n "#!/bin/sh\n/usr/bin/java -DconfigFile=/opt/portal/config/portal.properties -jar /opt/portal/lib/mip.jar" > /opt/portal/mip.sh \
-    && chmod +x /opt/portal/mip.sh
+COPY mip.sh /opt/portal/
+RUN chmod +x /opt/portal/mip.sh
 EXPOSE 8080
 
 VOLUME /opt/portal/config/
@@ -16,4 +15,4 @@ VOLUME /opt/portal/lib/
 
 WORKDIR /opt/portal/
 
-CMD ["/usr/local/bin/dockerize", "-wait", "tcp://portaldb:5432", "/opt/portal/mip.sh"]
+CMD ["/usr/local/bin/dockerize", "-timeout", "240s", "-wait", "tcp://portaldb:5432", "/opt/portal/mip.sh"]
diff --git a/src/docker/build/mip.sh b/src/docker/build/mip.sh
new file mode 100644
index 0000000000000000000000000000000000000000..cfae68474c42a1e66b80edb0ea849911ddd8eef4
--- /dev/null
+++ b/src/docker/build/mip.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+/usr/bin/java -DconfigFile=/opt/portal/config/application.yml -jar /opt/portal/lib/mip.jar
diff --git a/src/main/resources/application.yml b/src/test/docker/application.yml
similarity index 68%
rename from src/main/resources/application.yml
rename to src/test/docker/application.yml
index af4912aa5d32be0a05ff1a11608eb85f55af30bb..0e58f67673ccd6af7cd396083a7e64ce4d29ea77 100644
--- a/src/main/resources/application.yml
+++ b/src/test/docker/application.yml
@@ -1,3 +1,13 @@
+# Configuration for the portal running inside a Docker container for development
+
+connection:
+  url: "jdbc:postgresql://portaldb:5432/postgres"
+  username: "postgres"
+  password: "test"
+
+security:
+  enabled: false
+
 hbp:
   client:
     clientId: 996f97c5-a3ca-460e-b18b-00df3e2be89a
@@ -19,4 +29,8 @@ spring:
     chain:
       enabled: true
 
+server:
+  contextPath: /services
+  port: 8080
+  use-forward-headers: true
 
diff --git a/src/test/docker/portal.properties b/src/test/docker/portal.properties
deleted file mode 100644
index dc4de9ec3046957eefb073035d527063fdfda74b..0000000000000000000000000000000000000000
--- a/src/test/docker/portal.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# Configuration for the portal running inside a Docker container for development
-
-connection.url="jdbc:postgresql://portaldb:5432/postgres"
-connection.username="postgres"
-connection.password="test"
-
-security.enabled=false