-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
75 lines (49 loc) · 1.9 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
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
FROM node:18-alpine3.17 as build
WORKDIR /home/node
RUN apk update && apk upgrade && \
apk add --no-cache bash git build-base libstdc++ gcc yarn libpng-dev python3 g++ make libc6-compat curl
RUN npm install url-loader --save-dev
RUN git clone -b fix_fuse_dependancy_arm --depth 1 http://github.com/vatesfr/xen-orchestra
RUN cd /home/node/xen-orchestra && yarn config set network-timeout 30000000 && yarn && yarn build
COPY link_plugins.sh /home/node/xen-orchestra/packages/xo-server/link_plugins.sh
RUN chmod +x /home/node/xen-orchestra/packages/xo-server/link_plugins.sh && \
/home/node/xen-orchestra/packages/xo-server/link_plugins.sh
#LIBVHDI
FROM node:18-alpine3.17 as build-libvhdi
WORKDIR /home/node
RUN apk add --no-cache git g++ make bash automake autoconf libtool gettext-dev pkgconf fuse-dev fuse fuse3 fuse3-dev
RUN git clone https://github.com/libyal/libvhdi.git
RUN cd libvhdi && ./synclibs.sh && \
./autogen.sh && \
./configure && \
make && \
make install
##LIBVHDI
FROM node:18-alpine3.17
LABEL xo-server=5.7 xo-web=5.7
ENV USER=node USER_HOME=/home/node XOA_PLAN=5 DEBUG=xo:main
RUN mkdir -p /home/node
WORKDIR /home/node
RUN apk add --no-cache \
su-exec \
bash \
util-linux \
nfs-utils \
lvm2 \
fuse \
fuse3 \
gettext \
cifs-utils \
openssl
COPY --from=build /home/node/xen-orchestra /home/node/xen-orchestra
COPY --from=build /usr/local/bin/node /usr/bin/
COPY --from=build /usr/lib/libgcc* /usr/lib/libstdc* /usr/lib/
COPY --from=build-libvhdi /usr/local/bin/vhdimount /usr/local/bin/vhdiinfo /usr/local/bin/
COPY --from=build-libvhdi /usr/local/lib/libvhdi* /usr/local/lib/
COPY xo-server.config.yaml /home/node/xen-orchestra/packages/xo-server/.xo-server.yaml
ENV REDIS_SERVER="redis" \
REDIS_PORT="6379"
EXPOSE 80
ADD start.sh /usr/local/bin/start.sh
RUN chmod a+x /usr/local/bin/start.sh
CMD ["/usr/local/bin/start.sh"]