-
Notifications
You must be signed in to change notification settings - Fork 19
/
Dockerfile
61 lines (50 loc) · 1.73 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
FROM --platform=$BUILDPLATFORM eclipse-temurin:23.0.1_11-jdk-alpine
ARG BUILD_CONTEXT="build-context"
ARG UID=worker
ARG GID=worker
# renovate: pypi: unoserver
ARG VERSION_UNOSERVER=3.0.1
LABEL org.opencontainers.image.title="unoserver-docker"
LABEL org.opencontainers.image.description="Container image that contains unoserver and libreoffice including large set of fonts for file format conversions"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.documentation="https://github.com/unoconv/unoserver-docker/blob/main/README.adoc"
LABEL org.opencontainers.image.source="https://github.com/unoconv/unoserver-docker"
LABEL org.opencontainers.image.url="https://github.com/unoconv/unoserver-docker"
WORKDIR /
RUN addgroup -S ${GID} && adduser -S ${UID} -G ${GID}
RUN apk add --no-cache \
bash curl \
py3-pip \
libreoffice \
supervisor
# fonts - https://wiki.alpinelinux.org/wiki/Fonts
RUN apk add --no-cache \
font-noto font-noto-cjk font-noto-extra \
terminus-font \
ttf-font-awesome \
ttf-dejavu \
ttf-freefont \
ttf-hack \
ttf-inconsolata \
ttf-liberation \
ttf-mononoki \
ttf-opensans \
fontconfig && \
fc-cache -f
RUN rm -rf /var/cache/apk/* /tmp/*
# https://github.com/unoconv/unoserver/
RUN pip install --break-system-packages -U unoserver==${VERSION_UNOSERVER}
# setup supervisor
COPY --chown=${UID}:${GID} ${BUILD_CONTEXT} /
RUN chmod +x entrypoint.sh && \
# mkdir -p /var/log/supervisor && \
# chown ${UID}:${GID} /var/log/supervisor && \
# mkdir -p /var/run && \
chown -R ${UID}:0 /run && \
chmod -R g=u /run
USER ${UID}
WORKDIR /home/worker
ENV HOME="/home/worker"
VOLUME ["/data"]
EXPOSE 2003
ENTRYPOINT ["/entrypoint.sh"]