added dockerized build chain
This commit is contained in:
9
.dockerignore
Normal file
9
.dockerignore
Normal file
@@ -0,0 +1,9 @@
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
|
||||
.gitignore
|
||||
|
||||
package-lock.json
|
||||
|
||||
build
|
||||
node_modules
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -21,3 +21,6 @@
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# docker
|
||||
docker-compose.yaml
|
||||
21
Dockerfile
Normal file
21
Dockerfile
Normal 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
|
||||
Reference in New Issue
Block a user