File size: 628 Bytes
05eec1f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
611037c
 
 
05eec1f
611037c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ARG QUARTO_VERSION="1.3.340"

# Use the Quarto base image
FROM ghcr.io/quarto-dev/quarto:${QUARTO_VERSION} AS builder

COPY src /app
WORKDIR /app

# Install Python requirements
USER root
RUN apt-get update && apt-get install -y python3 python3-pip
COPY requirements.txt /app/
RUN pip3 install -r requirements.txt

# Use Quarto to render your site
RUN quarto render .

# Use httpd:alpine as the final image to serve the site
FROM httpd:alpine

# Configure Apache to listen on port 8080
RUN sed -i 's/Listen 80/Listen 8080/' /usr/local/apache2/conf/httpd.conf
COPY --from=builder /app/_site/ /usr/local/apache2/htdocs/
EXPOSE 8080