From 586322a086ac3aa055dbe3481c5ece888e26e87e Mon Sep 17 00:00:00 2001
From: kaimeister <kaioliver.meister@stud.uni-goettingen.de>
Date: Sun, 9 Mar 2025 14:39:43 +0100
Subject: [PATCH] testing

---
 .gitlab-ci.yml | 12 ++----------
 Dockerfile     | 12 +++++++++++-
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e6eb3a23..e689d890 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,6 +5,7 @@ stages:
 
 variables:
   TEST_IMAGE: $CI_REGISTRY_IMAGE/test-image
+  TEST_IMAGE_WORKDIR: "/app/"
   # this line essentially disables TLS
   DOCKER_TLS_CERTDIR: ""
 
@@ -90,16 +91,7 @@ extract_frontend:
   image: $TEST_IMAGE
   <<: *build_files_cache
   script:
-    - pwd
-    - ls -la
-    - cd app || true && echo "no app dir"
-    - pwd
-    - ls -la
-    - cd /app || true && echo "no /app dir"
-    - pwd
-    - ls -la
-    - cd ~/app || true && echo "no ~/app dir"
-    - pwd
+    # - cd $TEST_IMAGE_WORKDIR
     - ls -la
     - echo "Extracting build files from Image into the cache..."
   interruptible: true
diff --git a/Dockerfile b/Dockerfile
index 9da64423..d387758c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,8 +1,8 @@
+
 # first stage:
 #	use an official node-image as compilation base
 FROM node:current-alpine3.21 AS build_stage
 
-WORKDIR /
 # add the current (01.03.2025) GitHub-Host RSA SSH-key to known_hosts
 # (manually grabbed from https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints)
 RUN mkdir ~/.ssh/ \
@@ -33,3 +33,13 @@ RUN ls -la
 # ENTRYPOINT ["cd", "~/app/", "&&" "npm", "run", "preview:exposed"]
 # # and expose the port explicitly
 # EXPOSE 4173
+
+# second stage:
+#	use/create a smaller image that is actually stored
+#	everything from previous stages is discarded !
+FROM node:current-alpine3.21 AS serving_stage
+
+COPY --from=build_stage ~/.ssh/ ~/
+COPY --from=build_stage build/ .
+COPY --from=build_stage .svelte-kit/ .
+COPY --from=build_stage node_modules/ .
-- 
GitLab