Add container build action
This commit is contained in:
parent
62eb38601b
commit
428c187618
2 changed files with 39 additions and 0 deletions
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
|||
FROM node:20 AS build
|
||||
|
||||
WORKDIR /usr
|
||||
COPY package.json ./
|
||||
COPY package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . ./
|
||||
RUN npm run build
|
||||
|
||||
FROM node:20
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json ./
|
||||
COPY package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . ./
|
||||
COPY --from=build /usr/build /app
|
||||
|
||||
EXPOSE 8000
|
||||
CMD ["node", "/app"]
|
Loading…
Add table
Add a link
Reference in a new issue