-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
38 lines (31 loc) · 1.31 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
FROM node:18-bullseye
LABEL maintainer="Emerson Rocha <[email protected]>"
# ARG UWAZI_GIT_RELEASE_REF=production
ARG UWAZI_GIT_RELEASE_REF
## Install common software
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
bzip2 \
dh-autoreconf \
git \
libpng-dev \
gnupg \
poppler-utils
# Install mongo & mongorestore (this is used only for database initialization, not on runtime)
# So much space need, see 'After this operation, 184 MB of additional disk space will be used.'
RUN curl -fsSL https://pgp.mongodb.com/server-6.0.asc | \
gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg \
--dearmor
RUN echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg] http://repo.mongodb.org/apt/debian bullseye/mongodb-org/6.0 main" \
| tee /etc/apt/sources.list.d/mongodb-org-6.0.list \
&& apt-get update \
&& apt-get install -y mongodb-mongosh mongodb-org-tools \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN git clone -b "$UWAZI_GIT_RELEASE_REF" --single-branch --depth=1 https://github.com/huridocs/uwazi.git /home/node/uwazi/ \
&& chown node:node -R /home/node/uwazi/ \
&& cd /home/node/uwazi/ \
&& yarn install \
&& yarn production-build
WORKDIR /home/node/uwazi/
COPY --chown=node:node docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]