aboutsummaryrefslogtreecommitdiffstats
path: root/code/app/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'code/app/Dockerfile')
-rw-r--r--code/app/Dockerfile14
1 files changed, 14 insertions, 0 deletions
diff --git a/code/app/Dockerfile b/code/app/Dockerfile
new file mode 100644
index 0000000..a79f35e
--- /dev/null
+++ b/code/app/Dockerfile
@@ -0,0 +1,14 @@
+# syntax=docker/dockerfile:1
+FROM node:18.12.0-alpine3.16 AS builder
+WORKDIR .
+COPY package.json .
+RUN npm i
+COPY . .
+RUN npm run build
+FROM node:18.12.0-alpine3.16
+USER node:node
+WORKDIR .
+COPY --from=builder --chown=node:node build build
+COPY --from=builder --chown=node:node node_modules node_modules
+COPY --chown=node:node package.json .
+CMD ["node","build"] \ No newline at end of file