1b9216b341
* Use npm ci over install to achive faster and more expectable build results; Split copy package(-lock).json files and ci then to avoid reinstalling dependencies when not needed => Faster build times * Stopp adding wasm type to mime.types, its already there (duplicate): - avoids warning in console - cleans up - might have been missing in past nginx:alpine versions but now exists * Change node tag from alpine and nginx to more specific ones for #260
18 lines
291 B
Docker
18 lines
291 B
Docker
## Builder
|
|
FROM node:17.4.0-alpine3.15 as builder
|
|
|
|
WORKDIR /src
|
|
|
|
COPY package.json package-lock.json /src
|
|
RUN npm ci
|
|
COPY . /src
|
|
RUN npm run build
|
|
|
|
|
|
## App
|
|
FROM nginx:1.21.6-alpine
|
|
|
|
COPY --from=builder /src/dist /app
|
|
|
|
RUN rm -rf /usr/share/nginx/html \
|
|
&& ln -s /app /usr/share/nginx/html
|