rorenv/docker/config/kopano/Dockerfile

51 lines
1.8 KiB
Docker
Raw Permalink Normal View History

2023-04-29 21:11:49 +09:00
FROM ubuntu:focal
USER root
ADD entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
COPY ./packages /root/packages
ENV DEBIAN_FRONTEND=noninteractive \
SERVER_MYSQL_HOST=kopano_db \
SERVER_MYSQL_PORT=3306 \
SERVER_MYSQL_USER=kopano \
SERVER_MYSQL_PASSWORD=kopano \
SERVER_MYSQL_DATABASE=kopano \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
RUN cd /root/packages && \
apt update && \
apt install -y \
apache2 \
curl \
gnupg \
mariadb-client \
iproute2 \
php \
postfix \
postfix-mysql \
sasl2-bin \
software-properties-common \
vim && \
mkdir -p /var/spool/postfix/var/run && \
cp -ar /var/run/saslauthd /var/spool/postfix/var/run/ && \
tar -zxvf core-11.0.2.51.c08b7f4-Ubuntu_20.04-amd64.tar.gz && \
rm core-11.0.2.51.c08b7f4-Ubuntu_20.04-amd64.tar.gz && \
tar -zxvf webapp-6.0.0.66.43d5c5d-Ubuntu_20.04-all.tar.gz && \
rm webapp-6.0.0.66.43d5c5d-Ubuntu_20.04-all.tar.gz && \
dpkg -i core-11.0.2.51.c08b7f4-Ubuntu_20.04-amd64/* || true && \
dpkg -i webapp-6.0.0.66.43d5c5d-Ubuntu_20.04-all/* || true && \
apt -y --fix-broken install && \
curl https://download.kopano.io/zhub/z-push:/final/Ubuntu_20.04/Release.key -o zhub.key && \
apt-key add zhub.key && \
rm zhub.key && \
add-apt-repository "deb https://download.kopano.io/zhub/z-push:/final/Ubuntu_20.04/ /" && \
apt install -y z-push-backend-kopano z-push-ipc-sharedmemory z-push-config-apache && \
chown www-data:www-data /var/lib/z-push/ /var/log/z-push/ && \
a2dissite 000-default && \
a2ensite kopano-webapp && \
a2enmod expires headers && \
mkdir -p /var/lib/kopano/attachments && \
chown 999:999 /var/lib/kopano/attachments && \
chmod 750 /var/lib/kopano/attachments && \
locale-gen en_US.UTF-8