-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
30 lines (22 loc) · 945 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM node:21-bookworm
# this allows the setup to ignore all of the ubuntu OS setup
# thats not needed for this docker image (Time Zone for example)
ARG DEBIAN_FRONTEND=noninteractive
# tools needed for docker setup
RUN apt-get update && apt-get install -y apt-utils bash sudo
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Node.js, PostgreSQL, headers for R packages
RUN apt-get update && apt-get install -y \
build-essential unzip \
libfontconfig1-dev \
libpq-dev
# Copy only package*.json, which are likely unchanged, allowing caching
COPY package.json package-lock.json /project/
COPY patches /project/patches
# Set the working dir to the project & install and compile all dependency
WORKDIR /project/
RUN SKIP_COMPILE=true npm ci --ignore-scripts=false --foreground-scripts
# copy all files, which likely have changed, and prevent caching
COPY . /project/
RUN npm run compile