use workdir for build
This commit is contained in:
parent
c005977218
commit
78b19da093
12
Dockerfile
12
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/
|
||||
COPY --from=composer public .
|
Loading…
Reference in a new issue