|
1 | | -FROM python:3.6-slim-stretch |
| 1 | +FROM python:3.7-slim-buster |
2 | 2 |
|
3 | 3 | RUN apt-get update \ |
| 4 | + # -slim images strip man dirs, but java won't install unless this dir exists. |
| 5 | + && mkdir -p /usr/share/man/man1 \ |
4 | 6 | && apt-get install -y \ |
5 | 7 | git \ |
6 | 8 | imagemagick \ |
7 | 9 | libreoffice-script-provider-python \ |
| 10 | + libreoffice \ |
8 | 11 | && apt-get clean \ |
9 | 12 | && apt-get autoremove -y \ |
10 | | - && rm -rf /var/lib/apt/lists/* |
| 13 | + && rm -rf /var/lib/apt/lists/* \ |
| 14 | + && pip install unoconv==0.8.2 |
11 | 15 |
|
12 | 16 | # additional fonts |
13 | | -RUN echo "deb http://httpredir.debian.org/debian stretch main contrib non-free" > /etc/apt/sources.list \ |
14 | | - && echo "deb http://httpredir.debian.org/debian stretch-updates main contrib non-free" >> /etc/apt/sources.list \ |
15 | | - && echo "deb http://security.debian.org/ stretch/updates main contrib non-free" >> /etc/apt/sources.list \ |
| 17 | +RUN echo "deb http://httpredir.debian.org/debian buster main contrib non-free" > /etc/apt/sources.list \ |
| 18 | + && echo "deb http://httpredir.debian.org/debian buster-updates main contrib non-free" >> /etc/apt/sources.list \ |
| 19 | + && echo "deb http://security.debian.org/ buster/updates main contrib non-free" >> /etc/apt/sources.list \ |
16 | 20 | && echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections \ |
17 | 21 | && apt-get update \ |
18 | 22 | && apt-get install -y \ |
@@ -55,42 +59,12 @@ RUN apt-get update \ |
55 | 59 | RUN usermod -d /home www-data \ |
56 | 60 | && chown www-data:www-data /home |
57 | 61 |
|
58 | | -ENV LIBREOFFICE_VERSION 6.1.5 |
59 | | -ENV LIBREOFFICE_ARCHIVE LibreOffice_6.1.5_Linux_x86-64_deb.tar.gz |
60 | | -ENV LIBREOFFICE_MIRROR_URL https://download.documentfoundation.org/libreoffice/stable/ |
61 | | -RUN apt-get update \ |
62 | | - && apt-get install -y \ |
63 | | - curl \ |
64 | | - gnupg2 \ |
65 | | - && for server in hkp://ipv4.pool.sks-keyservers.net:80 \ |
66 | | - hkp://ha.pool.sks-keyservers.net:80 \ |
67 | | - hkp://pgp.mit.edu:80 \ |
68 | | - hkp://keyserver.pgp.com:80 \ |
69 | | - ; do \ |
70 | | - gpg --keyserver "$server" --recv-keys AFEEAEA3 && break || echo "Trying new server..." \ |
71 | | - ; done \ |
72 | | - && curl -SL "$LIBREOFFICE_MIRROR_URL/$LIBREOFFICE_VERSION/deb/x86_64/$LIBREOFFICE_ARCHIVE" -o $LIBREOFFICE_ARCHIVE \ |
73 | | - && curl -SL "$LIBREOFFICE_MIRROR_URL/$LIBREOFFICE_VERSION/deb/x86_64/$LIBREOFFICE_ARCHIVE.asc" -o $LIBREOFFICE_ARCHIVE.asc \ |
74 | | - && gpg --verify "$LIBREOFFICE_ARCHIVE.asc" \ |
75 | | - && mkdir /tmp/libreoffice \ |
76 | | - && tar -xvf "$LIBREOFFICE_ARCHIVE" -C /tmp/libreoffice/ --strip-components=1 \ |
77 | | - && dpkg -i /tmp/libreoffice/**/*.deb \ |
78 | | - && rm $LIBREOFFICE_ARCHIVE* \ |
79 | | - && rm -Rf /tmp/libreoffice \ |
80 | | - && apt-get clean \ |
81 | | - && apt-get autoremove -y \ |
82 | | - curl \ |
83 | | - gnupg2 \ |
84 | | - && rm -rf /var/lib/apt/lists/* |
85 | | - |
86 | | -RUN pip install unoconv==0.8.2 |
87 | | - |
88 | | -ENV UNO_PATH=/opt/libreoffice6.1 |
| 62 | +ENV UNO_PATH /usr/lib/libreoffice |
89 | 63 |
|
90 | 64 | COPY entrypoint.sh /entrypoint.sh |
91 | 65 | RUN chmod +x /entrypoint.sh |
92 | 66 | ENTRYPOINT ["/entrypoint.sh"] |
93 | 67 |
|
94 | 68 | EXPOSE 2002 |
95 | 69 |
|
96 | | -CMD ["gosu", "www-data", "/opt/libreoffice6.1/program/python", "-u", "/usr/local/bin/unoconv", "--listener", "--server=0.0.0.0", "--port=2002", "-vvv"] |
| 70 | +CMD ["gosu", "www-data", "/usr/bin/python3.7", "/usr/local/bin/unoconv", "--listener", "--server=0.0.0.0", "--port=2002", "-vvv"] |
0 commit comments