added dockerized build chain

This commit is contained in:
2024-04-20 13:24:08 +02:00
parent 90286fbe13
commit 4601da0ae7
3 changed files with 33 additions and 0 deletions

9
.dockerignore Normal file
View File

@@ -0,0 +1,9 @@
Dockerfile
.dockerignore
.gitignore
package-lock.json
build
node_modules

3
.gitignore vendored
View File

@@ -21,3 +21,6 @@
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
# docker
docker-compose.yaml

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM alpine AS npm
RUN apk add npm
FROM npm AS npm-installed
WORKDIR source
ADD package.json .
RUN npm install
FROM npm-installed AS builder
ADD . .
RUN npm run build
FROM nginx:stable-alpine3.17-slim
COPY --from=builder /source/build /usr/share/nginx/html