forked from cylab-tw/raccoon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (41 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 node:14-bullseye-slim
# install gcc
RUN apt-get update -y
RUN apt-get install -qq -y --no-install-recommends \
gcc \
libc6-dev \
python \
python3-pip \
ffmpeg \
libsm6 \
libxext6 \
dcmtk \
cmake \
make \
swig \
netcat \
imagemagick \
wget
RUN pip3 install --upgrade pip
COPY requirements.txt /requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Build iconv
WORKDIR /
RUN wget -O libiconv.tar.gz https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz && tar xzvf libiconv.tar.gz
WORKDIR /libiconv-1.16
RUN ./configure --prefix=/usr/local/apps && make && make install
RUN rm -rf /libiconv.tar.gz
WORKDIR /
RUN mkdir -p /nodejs/raccoon/
WORKDIR /nodejs/raccoon/
COPY package*.json /nodejs/raccoon/
COPY . /nodejs/raccoon/
RUN npm set unsafe-perm true
RUN npm rebuild
RUN npm install pm2@latest -g
RUN npm install
ENV DCMDICTPATH="/nodejs/raccoon/models/dcmtk/dicom.dic"
EXPOSE 8081
RUN apt-get purge -y wget
CMD ["pm2-runtime" , "start" , "ecosystem.config.js"]
#https://gist.github.com/marcinwol/089d4a91f1a1279e33f9