-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
61 lines (36 loc) · 1.66 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
FROM ubuntu:20.04
WORKDIR /carbone_install
RUN apt-get update
RUN apt-get install -y apt-utils
# Install required dependencies on ubuntu server for LibreOffice 7.0+
RUN apt-get install -y wget libxinerama1 libfontconfig1 libdbus-glib-1-2 libcairo2 libcups2 libglu1-mesa libsm6
# remove all old version of LibreOffice
RUN apt remove --purge libreoffice*
RUN apt autoremove --purge
# If you want to use Microsoft fonts in reports, you must install the fonts
# Andale Mono, Arial Black, Arial, Comic Sans MS, Courier New, Georgia, Impact,
# Times New Roman, Trebuchet, Verdana,Webdings)
RUN apt-get install -y ttf-mscorefonts-installer
# If you want to use special characters, such as chinese ideograms, you must install a font that support them
# For example:
RUN apt-get install -y fonts-wqy-zenhei
# Download LibreOffice debian package. Select the right one (64-bit or 32-bit) for your OS.
# Get the latest from http://download.documentfoundation.org/libreoffice/stable
# or download the version currently "carbone-tested":
RUN wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.0.4.2/deb/x86_64/LibreOffice_7.0.4.2_Linux_x86-64_deb.tar.gz
# Uncompress package
RUN tar -zxvf LibreOffice_7.0.4.2_Linux_x86-64_deb.tar.gz
#RUN cd LibreOffice_7.0.4.2_Linux_x86-64_deb/DEBS
# Install LibreOffice
RUN dpkg -i LibreOffice_7.0.4.2_Linux_x86-64_deb/DEBS/*.deb
RUN apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get -y install nodejs
RUN apt-get install -y vim
COPY package.json /carbone/
COPY package-lock.json /carbone/
WORKDIR /carbone
RUN npm install
COPY . /carbone
RUN node /carbone/main.js
CMD cp result.odt /out