Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
119 lines (97 loc) · 2.77 KB
/
Copy pathDockerfile
File metadata and controls
119 lines (97 loc) · 2.77 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
FROM ubuntu:24.04
RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y \
apt-transport-https \
software-properties-common \
wget \
unzip \
curl \
ca-certificates \
build-essential \
checkinstall \
cmake \
pkg-config \
yasm \
git \
nano \
cron \
dialog \
net-tools \
nginx \
libboost-all-dev \
libopencv-dev \
libtesseract-dev \
openssl \
libssl-dev
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10
## begin node
## old node install commands
# RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
# RUN apt-get install -y nodejs
## new node install commands
ARG node_version=v18.20.2
RUN cd /opt \
&& curl -LO https://nodejs.org/dist/${node_version}/node-${node_version}-linux-x64.tar.xz \
&& tar xJf node-${node_version}-linux-x64.tar.xz \
&& rm node-${node_version}-linux-x64.tar.xz
ENV PATH=/opt/node-${node_version}-linux-x64/bin:${PATH}
## end node
WORKDIR /
# Update npm and install pm2
#RUN npm install -g n
#RUN n latest
#ENV PATH="${PATH}"
RUN npm install -g pm2
# Install nginx
EXPOSE 80 443
RUN rm -v /etc/nginx/nginx.conf
RUN ln -s /data/config/nginx.conf /etc/nginx/nginx.conf
COPY mime.types /etc/nginx/
# copy blank config into container
COPY dataorig /dataorig/
# Clone repos
WORKDIR /
#RUN git clone https://github.com/stt-datacore/website.git #- run script should do this
# experimental and easy to revert
RUN git clone https://github.com/stt-datacore/cpp-image-analysis.git
RUN git clone https://github.com/stt-datacore/bot.git
RUN git clone https://github.com/stt-datacore/asset-server.git
RUN git clone https://github.com/stt-datacore/site-server.git
# Build asset parser
WORKDIR /asset-server
RUN npm install
RUN npm run build
# Build image-analysis
#WORKDIR /image-analysis
#RUN dotnet restore
#RUN dotnet build
#WORKDIR /
#RUN ln -s /data/config/img-analysis-settings.json /image-analysis/src/DataCore.Daemon/appsettings.json
# Build bot
WORKDIR /bot
RUN npm install
#RUN ln -s /data/config/env /bot/.env
# Build site server
WORKDIR /site-server
RUN npm install
RUN npm run build
#RUN ln -s /data/config/env /site-server/.env
#RUN ln -s /data/profiles /site-server/static
RUN mkdir /cpp-image-analysis/build
WORKDIR /cpp-image-analysis/build
RUN cmake ..
RUN make -j$(nproc)
# Create config Dir
#RUN mkdir -p /data/config
## Create blank config Dir (contains source files for user to fill)
#RUN mkdir -p /dataorig/asset-server
#RUN touch /dataorig/runcomplete
#
## Asset server data goes here
#RUN mkdir /data/asset-server
#RUN mv /asset-server/out/* /dataorig/asset-server/
#RUN rm -rf /asset-server/out
#RUN ln -s /data/asset-server /asset-server/out
RUN echo Node Version
RUN node --version
COPY ./runme.sh /runme.sh
ENTRYPOINT /runme.sh