From 26a40eb76c1d4ef5d2ccf2d33702796ab6c9b50f Mon Sep 17 00:00:00 2001 From: Harsh Pandey Date: Sat, 11 May 2024 10:38:14 -0400 Subject: [PATCH] upgrade to latest builder --- Dockerfile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e45a3a1..c085127 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,24 @@ -FROM node:18 +FROM node:18.18-alpine as build WORKDIR /app +RUN apk add --update git + COPY . . -RUN npm i -g hathora@0.11.5 +RUN npm i -g hathora@0.12.2 RUN npx hathora build --only server +FROM node:18.18-alpine + +WORKDIR /app + +# https://github.com/uNetworking/uWebSockets.js/discussions/346#discussioncomment-1137301 +RUN apk add --no-cache libc6-compat +RUN ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2 + +COPY --from=build /app/server/dist server/dist + ENV NODE_ENV=production ENV DATA_DIR=/app/data