Skip to content

Commit 95afee4

Browse files
authored
Merge pull request #49 from felliott/feature/unoconv-fixes
More unoconv fixes
2 parents b2c3abf + 20348db commit 95afee4

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed

unoconv/Dockerfile

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.6-slim
1+
FROM python:3.6-slim-stretch
22

33
RUN apt-get update \
44
&& apt-get install -y \
@@ -32,7 +32,15 @@ ENV GOSU_VERSION 1.4
3232
RUN apt-get update \
3333
&& apt-get install -y \
3434
curl \
35-
&& gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
35+
gnupg2 \
36+
&& mkdir ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf \
37+
&& for server in hkp://ipv4.pool.sks-keyservers.net:80 \
38+
hkp://ha.pool.sks-keyservers.net:80 \
39+
hkp://pgp.mit.edu:80 \
40+
hkp://keyserver.pgp.com:80 \
41+
; do \
42+
gpg --keyserver "$server" --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && break || echo "Trying new server..." \
43+
; done \
3644
&& curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
3745
&& curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
3846
&& gpg --verify /usr/local/bin/gosu.asc \
@@ -41,6 +49,7 @@ RUN apt-get update \
4149
&& apt-get clean \
4250
&& apt-get autoremove -y \
4351
curl \
52+
gnupg2 \
4453
&& rm -rf /var/lib/apt/lists/*
4554

4655
RUN usermod -d /home www-data \
@@ -52,28 +61,36 @@ ENV LIBREOFFICE_MIRROR_URL https://download.documentfoundation.org/libreoffice/s
5261
RUN apt-get update \
5362
&& apt-get install -y \
5463
curl \
55-
&& gpg --keyserver pool.sks-keyservers.net --recv-keys AFEEAEA3 \
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 \
5672
&& curl -SL "$LIBREOFFICE_MIRROR_URL/$LIBREOFFICE_VERSION/deb/x86_64/$LIBREOFFICE_ARCHIVE" -o $LIBREOFFICE_ARCHIVE \
57-
&& curl -SL "$LIBREOFFICE_MIRROR_URL/$LIBREOFFICE_VERSION/deb/x86_64/$LIBREOFFICE_ARCHIVE.asc" -o $LIBREOFFICE_ARCHIVE.asc \
58-
&& gpg --verify "$LIBREOFFICE_ARCHIVE.asc" \
59-
&& mkdir /tmp/libreoffice \
60-
&& tar -xvf "$LIBREOFFICE_ARCHIVE" -C /tmp/libreoffice/ --strip-components=1 \
61-
&& dpkg -i /tmp/libreoffice/**/*.deb \
62-
&& rm $LIBREOFFICE_ARCHIVE* \
63-
&& rm -Rf /tmp/libreoffice \
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 \
6480
&& apt-get clean \
6581
&& apt-get autoremove -y \
6682
curl \
83+
gnupg2 \
6784
&& rm -rf /var/lib/apt/lists/*
6885

6986
RUN pip install unoconv==0.8.2
7087

71-
ENV UNO_PATH=/opt/libreoffice6.0
88+
ENV UNO_PATH=/opt/libreoffice6.1
7289

7390
COPY entrypoint.sh /entrypoint.sh
7491
RUN chmod +x /entrypoint.sh
7592
ENTRYPOINT ["/entrypoint.sh"]
7693

7794
EXPOSE 2002
7895

79-
CMD ["gosu", "www-data", "/opt/libreoffice6.0/program/python", "-u", "/usr/local/bin/unoconv", "--listener", "--server=0.0.0.0", "--port=2002", "-vvv"]
96+
CMD ["gosu", "www-data", "/opt/libreoffice6.1/program/python", "-u", "/usr/local/bin/unoconv", "--listener", "--server=0.0.0.0", "--port=2002", "-vvv"]

0 commit comments

Comments
 (0)