From ed5e0995581e59499edc2f1b4cf2f5708c115a2c Mon Sep 17 00:00:00 2001 From: Cogent Apps Date: Sat, 29 Apr 2023 18:27:10 +0000 Subject: [PATCH] make docker image smaller --- Dockerfile | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2fc73cfc..dc071ea2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,33 +25,18 @@ ENV NODE_ENV=production # Build the application RUN npm run build -FROM nvidia/cuda:12.1.0-devel-ubuntu20.04 AS server +FROM node:19-bullseye-slim AS server # Set the working directory WORKDIR /app # Update the package index and install required dependencies -RUN apt-get update && \ - apt-get install -y \ - curl \ - build-essential \ - libssl-dev \ - libffi-dev \ - python3-dev \ - python3-pip \ - openssl - -RUN mkdir /usr/local/nvm -ENV NVM_DIR /usr/local/nvm -ENV NODE_VERSION 19.9.0 -RUN curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash \ - && . $NVM_DIR/nvm.sh \ - && nvm install $NODE_VERSION \ - && nvm alias default $NODE_VERSION \ - && nvm use default - -ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules -ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH +# RUN apt-get update && \ +# apt-get install -y \ +# curl \ +# build-essential \ +# libssl-dev \ +# openssl COPY ./server/package.json ./server/tsconfig.json ./