kirby cms website
parent
a5b26ebde1
commit
ba5d253c19
|
@ -0,0 +1,49 @@
|
|||
# Use latest offical ubuntu image
|
||||
FROM ubuntu:latest
|
||||
|
||||
# Set timezone
|
||||
ENV TZ=Europe/Berlin
|
||||
|
||||
# Set geographic area using above variable
|
||||
# This is necessary, otherwise building the image doesn't work
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
# Remove annoying messages during package installation
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install packages: web server & PHP plus extensions
|
||||
RUN apt-get update && apt-get install -y \
|
||||
apache2 \
|
||||
apache2-utils \
|
||||
ca-certificates \
|
||||
php \
|
||||
libapache2-mod-php \
|
||||
php-curl \
|
||||
php-dom \
|
||||
php-gd \
|
||||
php-intl \
|
||||
php-json \
|
||||
php-mbstring \
|
||||
php-xml \
|
||||
php-zip && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy virtual host configuration from current path onto existing 000-default.conf
|
||||
COPY default.conf /etc/apache2/sites-available/000-default.conf
|
||||
|
||||
# Remove default content (existing index.html)
|
||||
RUN rm /var/www/html/*
|
||||
|
||||
# Activate Apache modules headers & rewrite
|
||||
RUN a2enmod headers rewrite
|
||||
|
||||
# Ensure Group Ownership for www-data every member of kirbygroup should edit files
|
||||
RUN groupadd -g 1003 kirbygroup && usermod -aG kirbygroup www-data
|
||||
RUN chown -R www-data:kirbygroup /var/www/html
|
||||
RUN chmod -R g+rw /var/www/html && find /var/www/html -type d -exec chmod g+xs {} \;
|
||||
|
||||
# Tell container to listen to port 80 at runtime
|
||||
EXPOSE 80
|
||||
|
||||
# Start Apache web server
|
||||
CMD [ "/usr/sbin/apache2ctl", "-DFOREGROUND" ]
|
|
@ -0,0 +1,9 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName localhost
|
||||
# Set the document root
|
||||
DocumentRoot "/var/www/html"
|
||||
<Directory "/var/www/html">
|
||||
# Allow overriding the default configuration via `.htaccess`
|
||||
AllowOverride All
|
||||
</Directory>
|
||||
</VirtualHost>
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e -u
|
||||
|
||||
[[ $USERID ]] && usermod --uid "${USERID}" www-data
|
||||
|
||||
exec "$@"
|
|
@ -0,0 +1 @@
|
|||
USERID=0
|
Loading…
Reference in New Issue