aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorJan Tuomi <jan.tuomi@valuemotive.com>2021-11-04 13:36:59 +0200
committerJan Tuomi <jan.tuomi@valuemotive.com>2021-11-04 13:36:59 +0200
commite5f64574f890de462c01fed864356660d92a26a4 (patch)
treec45468612bfb495530f37f9a35a7f34cf56a4861 /Dockerfile
parent462b2fe10cf45da3dbcb5ee20ca6dfb79f46e6b6 (diff)
Fix Dockerfile
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile13
1 files changed, 5 insertions, 8 deletions
diff --git a/Dockerfile b/Dockerfile
index b52cf2b..7568586 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,21 +1,18 @@
-FROM node:15-alpine AS deps
+FROM node:15-alpine AS builder
-RUN apk add --no-cache libc6-compat
WORKDIR /app
+
+RUN apk add --no-cache libc6-compat
COPY package.json package-lock.json ./
RUN npm ci --only-prod
-FROM node:15-alpine as builder
-
-WORKDIR /app
COPY . .
-COPY --from=deps /app/node_modules ./node_modules
RUN npm run export
RUN rm -r .next/cache
-FROM halverneus/static-file-server
+FROM halverneus/static-file-server AS server
-COPY ./out /web
+COPY --from=builder /app/out /web
# FROM node:15-alpine as runner