-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (28 loc) · 1.11 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
FROM ubuntu:20.04
MAINTAINER Renko Steenbeek <[email protected]>
# Prevent question during installations
ENV TZ=Europe/Amsterdam
ENV DEBIAN_FRONTEND=noninteractive
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
# Download and install wkhtmltopdf and dependencies
RUN apt-get update && apt-get upgrade -y && apt-get install -y wget gdebi xvfb ttf-mscorefonts-installer php composer
# Get Wkhtmltopdf
ARG TARGETARCH
RUN echo "Preparing wkhtmltopdf for architecture: ${TARGETARCH}" && \
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_${TARGETARCH}.deb && \
gdebi --n wkhtmltox_0.12.6-1.focal_${TARGETARCH}.deb
#for nano working
ENV TERM xterm
# Composer for Snappy
ADD composer.json /composer.json
RUN composer install
# Allow all hosts by default
ENV allowedHosts=*
# webservice
ADD index.php /index.php
ADD templates.json /templates.json
ADD entrypoint.sh /entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]
COPY healthcheck.sh /healthcheck.sh
HEALTHCHECK --interval=10s CMD /healthcheck.sh