Project

General

Profile

root / branches / 5.0.x / docker / SCENARIsuite-starter / Dockerfile @ 41

1
FROM debian:10
2

    
3
ENV LANG C.UTF-8
4
ENV OOO_DISABLE_RECOVERY 1
5
ENV DISPLAY :1.0
6
ENV DEBIAN_FRONTEND noninteractive
7

    
8
RUN apt-get update && \
9
    apt-get install -y ffmpeg imagemagick jetty9 curl pwgen dumb-init && \
10
    apt-get install --no-install-recommends -y fonts-noto fonts-noto-cjk fonts-noto-unhinted fonts-noto-color-emoji fonts-noto-ui-core fonts-noto-mono fonts-liberation fontconfig && \
11
    apt-get install --no-install-recommends -y libreoffice libreoffice-java-common ure && \
12
    apt-get install --no-install-recommends -y texlive-latex-base texlive-latex-extra texlive-science texlive-fonts-recommended dvipng && \
13
    rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
14

    
15
ENV PS_DEB https://gitlab.com/postscriptum.app/cli/-/jobs/304457680/artifacts/raw/postscriptum-app-v0.8.006-linux.deb?inline=false
16
RUN curl -qs "$PS_DEB" -o /tmp/ps.deb && \
17
    dpkg -i /tmp/ps.deb && \
18
    rm -f /tmp/ps.deb
19

    
20
#ENV PS_NO_CHROMIUM_SANDBOX true
21
RUN perl -pi -e 's|, "--font-render-hinting=medium"|, "--font-render-hinting=medium", "--no-sandbox"|' /opt/postscriptum/cli/dist/cli.js
22

    
23
ENV SC_WEBAPP_NAME scsuitestr50
24

    
25
# Nightly SC TGZ
26
ENV SC_BASE_URL https://builds.kelis.fr/job/SCsuiteStarter-5.0/lastSuccessfulBuild
27
RUN SC_TGZ=$SC_BASE_URL/artifact/$(curl -qs "$SC_BASE_URL/api/xml?xpath=/freeStyleBuild/artifact/relativePath\[contains(text(),'Linux_x86_64.tgz')\]" | tr '<>' ' ' |cut -d ' ' -f 3) && \
28
    curl -qs "$SC_TGZ"  -o /tmp/SCENARI.tgz && \
29
    mkdir /var/cache/scenari && \
30
    tar zxf /tmp/SCENARI.tgz --strip 1 -C /var/cache/scenari && \
31
    chown -R jetty:jetty /var/cache/scenari && \
32
    rm -f /tmp/SCENARI.tgz
33

    
34
# Release SC TGZ
35
#ENV SC_TGZ https://download.scenari.software/SCENARIchain-server@5.0.0.00/SCENARIserver_5.0.000beta_201910101200.Linux_x86_64.tgz
36
#RUN curl -qs "$SC_TGZ"  -o /tmp/SCENARI.tgz && \
37
#    mkdir /var/cache/scenari && \
38
#    tar zxf /tmp/SCENARI.tgz --strip 1 -C /var/cache/scenari && \
39
#    chown -R jetty:jetty /var/cache/scenari && \
40
#    rm -f /tmp/SCENARI.tgz
41

    
42
RUN mkdir -p /var/lib/scenari /var/log/scenari && \
43
    chown -R jetty:jetty /var/lib/scenari /var/log/scenari && \
44
    usermod -d /var/lib/scenari jetty && \
45
    rm -rf /var/lib/jetty9/webapps/root
46

    
47
COPY jetty-start.ini /etc/jetty9/start.ini
48
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
49

    
50
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
51

    
52
VOLUME /var/lib/scenari
53
WORKDIR /var/lib/scenari
54

    
55
USER jetty
56
EXPOSE 8080
57

    
58
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
59
CMD ["/usr/bin/dumb-init", "--", "/usr/bin/java", "-XX:InitialRAMPercentage=40", "-XX:MaxRAMPercentage=60", "-Djava.awt.headless=true", "-Djetty.home=/usr/share/jetty9", "-Djetty.base=/usr/share/jetty9", "-Djava.io.tmpdir=/tmp", "-jar", "/usr/share/jetty9/start.jar", "jetty.state=/var/lib/jetty9/jetty.state", "jetty-started.xml"]
(1-1/3)