forked from ONLYOFFICE/DocumentServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
135 lines (121 loc) · 3.32 KB
/
Dockerfile.dev
File metadata and controls
135 lines (121 loc) · 3.32 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
FROM --platform=linux/amd64 ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_VERSION=18.x
# Install base dependencies
RUN apt-get update && apt-get install -y \
# Core utilities
curl \
wget \
git \
python3 \
python3-pip \
ca-certificates \
gnupg \
locales \
lsb-release \
apt-transport-https \
apt-utils \
nano \
net-tools \
unzip \
xxd \
sudo \
# Build tools
build-essential \
cmake \
gdb \
make \
pkg-config \
autoconf \
automake \
libtool \
# Java (for Closure Compiler)
default-jre \
default-jdk \
# Services
nginx \
supervisor \
postgresql-client \
# Development libraries
libicu-dev \
libcurl4-openssl-dev \
libcurl4 \
libxml2-dev \
libxml2 \
libxslt1-dev \
libssl-dev \
libboost-all-dev \
libboost-regex-dev \
libgtest-dev \
libaio1 \
libasound2 \
libcairo2 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libstdc++6 \
libxss1 \
libxtst6 \
zlib1g \
zlib1g-dev \
# Font libraries
libfreetype6-dev \
libfontconfig1-dev \
# Image libraries
libpng-dev \
libjpeg-dev \
libtiff-dev \
# Other deps
libglib2.0-dev \
libpcre3-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_VERSION} nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*
# Install Grunt globally
RUN npm install -g grunt-cli
# Set up working directory
WORKDIR /app/DocumentServer
# Create necessary directories
RUN mkdir -p /var/www/onlyoffice/documentserver && \
mkdir -p /var/log/onlyoffice/documentserver && \
mkdir -p /var/lib/onlyoffice/documentserver/App_Data && \
mkdir -p /etc/onlyoffice/documentserver && \
mkdir -p /etc/supervisor
# Copy source code
COPY core /app/DocumentServer/core
COPY server /app/DocumentServer/server
COPY web-apps /app/DocumentServer/web-apps
COPY sdkjs /app/DocumentServer/sdkjs
COPY core-fonts /app/DocumentServer/core-fonts
COPY dictionaries /app/DocumentServer/dictionaries
COPY fonts /app/DocumentServer/fonts
COPY prebuilt-tools /app/DocumentServer/prebuilt-tools
# Copy build script and run it
COPY build-with-version.sh /app/DocumentServer/build-with-version.sh
RUN chmod +x /app/DocumentServer/build-with-version.sh && \
/app/DocumentServer/build-with-version.sh
# Build web-apps
WORKDIR /app/DocumentServer/web-apps
RUN npm install && \
npm run build || grunt || echo "Web-apps build completed"
# Build sdkjs
WORKDIR /app/DocumentServer/sdkjs
RUN npm install && \
npm run build || grunt || echo "SDKJS build completed"
# Return to main directory
WORKDIR /app/DocumentServer
# Copy configuration files
COPY docker/entrypoint.sh /entrypoint.sh
COPY docker/supervisord.conf /etc/supervisor/supervisord.conf
COPY docker/nginx.conf /etc/nginx/nginx.conf
RUN chmod +x /entrypoint.sh
# Expose ports
EXPOSE 80 443
# Entrypoint
ENTRYPOINT ["/entrypoint.sh"]
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf", "-n"]