-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
36 lines (28 loc) · 1023 Bytes
/
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
FROM nginx:latest
# Configuration variable for HTTPS (through Let's Encrypt)
ARG HTTPS=false
ENV DOMAIN=organisation.org
# Use of HTTP & HTTPS ports
EXPOSE 80
EXPOSE 443
# Install dependencies
RUN apt-get update && \
apt-get install -y wget git
# Install Quarto
ARG QUARTO_VERSION=1.4.554
RUN wget https://github.com/quarto-dev/quarto-cli/releases/download/v$QUARTO_VERSION/quarto-$QUARTO_VERSION-linux-amd64.deb && \
apt install -y ./quarto-$QUARTO_VERSION-linux-amd64.deb && \
rm quarto-$QUARTO_VERSION-linux-amd64.deb
# Dependencies to enable HTTPS with Let's Encrypt
RUN if [ "$HTTPS" = "true" ]; then \
apt-get update && \
apt-get install -y certbot; \
fi
# Use of local sources of the repository to launch the portal
COPY . /usr/share/portal
WORKDIR /usr/share/portal
RUN quarto render --output-dir html && \
# Fix of README not used as index by quarto \
cd html && ln -sf README.html index.html
ENTRYPOINT ["/usr/share/portal/entrypoint.sh"]