-
Notifications
You must be signed in to change notification settings - Fork 101
/
Dockerfile
45 lines (39 loc) · 1.02 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM ruby:3.2-bookworm
MAINTAINER SciNote <[email protected]>
# additional dependecies
# libreoffice for file preview generation
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
libjemalloc2 \
libssl-dev \
nodejs \
postgresql-client \
default-jre-headless \
poppler-utils \
librsvg2-2 \
libvips42 \
graphviz \
libreoffice \
fonts-droid-fallback \
fonts-noto-mono \
fonts-wqy-microhei \
fonts-wqy-zenhei \
libfile-mimeinfo-perl \
chromium \
chromium-sandbox \
yarnpkg && \
ln -s /usr/lib/x86_64-linux-gnu/libvips.so.42 /usr/lib/x86_64-linux-gnu/libvips.so && \
rm -rf /var/lib/apt/lists/*
ENV PATH=/usr/share/nodejs/yarn/bin:$PATH
RUN yarn add puppeteer@npm:puppeteer-core@^22.15.0
ENV BUNDLE_PATH /usr/local/bundle/
# create app directory
ENV APP_HOME /usr/src/app
ENV PATH $APP_HOME/bin:$PATH
RUN mkdir $APP_HOME
RUN adduser --uid 1000 scinote
RUN chown scinote:scinote $APP_HOME
USER scinote
ENV CHROMIUM_PATH=$APP_HOME/bin/chromium
WORKDIR $APP_HOME
CMD rails s -b 0.0.0.0