From 78b19da093e367ae35790cda22e914a0a022026f Mon Sep 17 00:00:00 2001
From: Jonas Leder <jonas@jonasled.de>
Date: Sun, 26 Sep 2021 00:12:02 +0200
Subject: [PATCH] use workdir for build

---
 Dockerfile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 5c10f18..d035489 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,17 +1,17 @@
 # Bootstrap SCSS
 FROM node:lts-alpine AS buildJS
 WORKDIR /build
-COPY . /build
-RUN mkdir /build/public/js
-RUN mkdir /build/public/css
+COPY . .
+RUN mkdir public/js
+RUN mkdir public/css
 RUN yarn install
 RUN yarn compile
 
 # Install PHP dependencies
 FROM composer:2 AS composer
 WORKDIR /build
-COPY --from=buildJS /build /build
-RUN cd /build/public/API && composer install
+COPY --from=buildJS . .
+RUN cd public/API && composer install
 
 # Prepare Webserver
 FROM gitlab.jonasled.de/jonasled/apache-php-minimal:latest
@@ -25,4 +25,4 @@ RUN apk update && \
 # |--------------------------------------------------------------------------
 # | copy website from node build
 # |--------------------------------------------------------------------------
-COPY --from=composer /build/public /var/www/localhost/htdocs/
\ No newline at end of file
+COPY --from=composer public .
\ No newline at end of file
-- 
GitLab