-
-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathDockerfile.debug
More file actions
19 lines (19 loc) · 996 Bytes
/
Dockerfile.debug
File metadata and controls
19 lines (19 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM ruby:3.2.3-slim
RUN groupadd --system --gid 1000 notebookai && useradd --system --home-dir /home/notebookai --gid notebookai --uid 1000 --shell /bin/bash notebookai
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev imagemagick libmagickwand-dev curl git libjemalloc2 && rm --recursive --force /var/lib/apt/lists/*
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" && \
case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
arm64) ARCH='arm64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac && \
curl -fsSLO "https://nodejs.org/dist/v20.12.2/node-v20.12.2-linux-$ARCH.tar.gz" && \
tar -xzf "node-v20.12.2-linux-$ARCH.tar.gz" -C /usr/local --strip-components=1 && \
rm "node-v20.12.2-linux-$ARCH.tar.gz"
RUN npm install -g yarn@1.22.22
WORKDIR /home/notebookai
COPY Gemfile Gemfile.lock package.json yarn.lock ./
RUN bundle install && yarn install
COPY . .
RUN chown -R notebookai:notebookai /home/notebookai
USER notebookai