-
Notifications
You must be signed in to change notification settings - Fork 46
/
apache.dockerfile
35 lines (27 loc) · 1.33 KB
/
apache.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
# Multi-stage build, see https://docs.docker.com/develop/develop-images/multistage-build/
FROM alpine AS builder
ENV VERSION 0.9.2
ADD https://github.com/sabre-io/Baikal/releases/download/$VERSION/baikal-$VERSION.zip .
RUN apk add unzip && unzip -q baikal-$VERSION.zip
# Final Docker image
FROM php:8.1-apache
LABEL description="Baikal is a Cal and CardDAV server, based on sabre/dav, that includes an administrative interface for easy management."
LABEL version="0.9.2"
LABEL repository="https://github.com/ckulka/baikal-docker"
LABEL website="http://sabre.io/baikal/"
# Install Baikal and required dependencies
COPY --from=builder baikal /var/www/baikal
RUN chown -R www-data:www-data /var/www/baikal &&\
apt-get update &&\
apt-get install -y libcurl4-openssl-dev sendmail &&\
rm -rf /var/lib/apt/lists/* &&\
docker-php-ext-install curl pdo pdo_mysql
# Configure Apache + HTTPS
COPY files/apache.conf /etc/apache2/sites-enabled/000-default.conf
RUN a2enmod rewrite ssl && openssl req -x509 -newkey rsa:2048 -subj "/C= " -keyout /etc/ssl/private/baikal.private.pem -out /etc/ssl/private/baikal.public.pem -days 3650 -nodes
# Expose HTTPS & data directory
EXPOSE 443
VOLUME /var/www/baikal/config
VOLUME /var/www/baikal/Specific
COPY files/start.sh /opt
CMD [ "sh", "/opt/start.sh" ]