32 lines
920 B
Docker
32 lines
920 B
Docker
FROM debian:bookworm-slim
|
|
|
|
# Install nginx, PHP-CLI, git, curl
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
nginx \
|
|
php-cli \
|
|
php-fpm \
|
|
git \
|
|
curl \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Hugo (extended)
|
|
ARG HUGO_VERSION=0.147.0
|
|
RUN curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" \
|
|
| tar -xz -C /usr/local/bin hugo
|
|
|
|
# nginx config
|
|
COPY nginx.conf /etc/nginx/sites-available/default
|
|
|
|
# PHP-FPM for deploy.php
|
|
RUN sed -i 's|listen = /run/php/php.*-fpm.sock|listen = 127.0.0.1:9000|' /etc/php/*/fpm/pool.d/www.conf \
|
|
&& sed -i 's|;clear_env = no|clear_env = no|' /etc/php/*/fpm/pool.d/www.conf \
|
|
|| echo 'clear_env = no' >> /etc/php/*/fpm/pool.d/www.conf
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 80
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|