-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (28 loc) · 1012 Bytes
/
Dockerfile
File metadata and controls
33 lines (28 loc) · 1012 Bytes
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
FROM gradle:jdk11-alpine
EXPOSE 2115
ENV LANG="en_US.UTF-8"
USER root
# Install packages
RUN apk update
RUN set -xe \
&& apk add --no-cache --purge -uU \
curl icu-libs unzip zlib-dev musl \
mesa-gl \
libreoffice-writer \
libreofficekit \
ttf-freefont ttf-opensans ttf-inconsolata \
ttf-liberation ttf-dejavu \
libstdc++ dbus-x11 \
&& rm -rf /var/cache/apk/* /tmp/*
# Custom font configuration
COPY ./00-fontconfig.conf /etc/fonts/conf.d/
# Create working folders
RUN mkdir -p /document-service/fonts /document-service/logs
COPY --chown=gradle:gradle . /home/gradle/project/
WORKDIR /home/gradle/project
# Build and install binary
RUN gradle clean buildJar --no-daemon --quiet
RUN cp ./document-service.jar /document-service/
# Run service
# * add-opens: https://github.com/ProxeusApp/document-service/issues/23#issuecomment-996166084
CMD ["java", "--add-opens=java.base/java.lang=ALL-UNNAMED", "-jar", "/document-service/document-service.jar"]