added core
This commit is contained in:
@@ -1,34 +1,29 @@
|
||||
# syntax=docker/dockerfile:1.3-labs
|
||||
FROM ubuntu:20.04
|
||||
# install apt packages
|
||||
WORKDIR /root
|
||||
RUN <<EOF
|
||||
apt-get update -y
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export TZ=Europe/Berlin
|
||||
apt-get install -y tzdata wget xz-utils
|
||||
apt-get autoclean
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
||||
EOF
|
||||
# install s6 process manager
|
||||
ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.1.2/s6-overlay-noarch.tar.xz /tmp
|
||||
ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.1.2/s6-overlay-x86_64.tar.xz /tmp
|
||||
RUN <<EOF
|
||||
tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
|
||||
tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz
|
||||
EOF
|
||||
COPY ./etc/s6-overlay /etc/s6-overlay
|
||||
# install kopano core
|
||||
RUN <<EOF
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends tzdata wget gnupg ca-certificates
|
||||
update-ca-certificates
|
||||
# install core
|
||||
wget --no-verbose -P/tmp http://bldr/core-11.0.2.50.507cbae-Ubuntu_20.04-amd64.tar.gz
|
||||
tar xzf /tmp/core-11.0.2.50.507cbae-Ubuntu_20.04-amd64.tar.gz
|
||||
for F in ~/core-11.0.2.50.507cbae-Ubuntu_20.04-amd64/*.deb; do dpkg --unpack --no-triggers $F; done
|
||||
apt-get install -f -y
|
||||
apt-get clean
|
||||
for F in core-11.0.2.50.507cbae-Ubuntu_20.04-amd64/*.deb; do dpkg --unpack --no-triggers $F; done
|
||||
apt-get install -f -y --no-install-recommends
|
||||
# cleanup
|
||||
apt-get autoclean
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
||||
rm -rf ~/core-11.0.2.50.507cbae-Ubuntu_20.04-amd64
|
||||
rm -rf core-11.0.2.50.507cbae-Ubuntu_20.04-amd64
|
||||
EOF
|
||||
# use envsubst in entrypoint script to convert config templates to actual config files
|
||||
COPY --chmod=0775 entrypoint.sh /entrypoint.sh
|
||||
# https://documentation.kopano.io/kopanocore_administrator_manual/configure_kc_components.html#configure-kopano-dagent-for-delivery-via-unix-socket
|
||||
EXPOSE 110
|
||||
EXPOSE 143
|
||||
EXPOSE 236
|
||||
EXPOSE 8443
|
||||
VOLUME /etc/kopano
|
||||
VOLUME /var/lib/kopano/attachments
|
||||
ENTRYPOINT ["/init"]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["/usr/sbin/kopano-server"]
|
||||
|
||||
21
core/build.sh
Normal file
21
core/build.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/bash
|
||||
# export DOCKER_BUILDKIT=1
|
||||
docker run -d --rm --name www -p80:80 -v/root/kopano-docker/dist:/usr/local/apache2/htdocs httpd
|
||||
docker build --no-cache --progress=plain -t core .
|
||||
docker build -t core .
|
||||
docker run --rm -it --name core -p8081:80 core bash
|
||||
docker logs -f core
|
||||
docker exec -it core bash
|
||||
docker run --rm -it ubuntu:20.04
|
||||
|
||||
docker kill core
|
||||
docker rm core
|
||||
|
||||
docker container ls
|
||||
docker container prune
|
||||
docker image ls
|
||||
docker image prune -a -f
|
||||
|
||||
# docker login --username baloan --password 'yZBCUs5&@?:.'
|
||||
# docker tag -t core:latest ...
|
||||
# docker push
|
||||
4
core/entrypoint.sh
Normal file
4
core/entrypoint.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
# export APACHE_RUN_DIR=/var/www
|
||||
exec "$@"
|
||||
@@ -1,7 +1,28 @@
|
||||
version: '3'
|
||||
services:
|
||||
core:
|
||||
image: kopano
|
||||
server:
|
||||
image: core
|
||||
depends_on:
|
||||
- db
|
||||
command: /usr/sbin/kopano-server
|
||||
dagent:
|
||||
image: core
|
||||
depends_on:
|
||||
- db
|
||||
- server
|
||||
command: /usr/sbin/kopano-dagent
|
||||
spooler:
|
||||
image: core
|
||||
depends_on:
|
||||
- db
|
||||
- server
|
||||
command: /usr/sbin/kopano-spooler
|
||||
search:
|
||||
image: core
|
||||
depends_on:
|
||||
- db
|
||||
- server
|
||||
command: /usr/sbin/kopano-search
|
||||
postfix:
|
||||
image: postfix
|
||||
volumes:
|
||||
@@ -10,16 +31,36 @@ services:
|
||||
image: webapp
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.webapp.rule=Host(`$MAIL_DOMAIN`)
|
||||
- traefik.http.routers.webapp.rule=Host(`$MAIL_DOMAIN`) && Path(`/webapp`)
|
||||
- traefik.http.routers.webapp.tls=true
|
||||
- traefik.http.routers.webapp.tls.certResolver=default
|
||||
depends_on:
|
||||
- server
|
||||
networks:
|
||||
- default
|
||||
- traefik
|
||||
z-push:
|
||||
image: z-push
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.webapp.rule=Host(`$MAIL_DOMAIN`) && Path(`/Active-Sync-...`)
|
||||
- traefik.http.routers.webapp.tls=true
|
||||
- traefik.http.routers.webapp.tls.certResolver=default
|
||||
volumes:
|
||||
- z-push:/var/lib/z-push
|
||||
depends_on:
|
||||
- server
|
||||
networks:
|
||||
- default
|
||||
- traefik
|
||||
db:
|
||||
image: mysql
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- database:/var/lib/mysql
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
volumes:
|
||||
- attachments:
|
||||
- database:
|
||||
|
||||
@@ -18,6 +18,7 @@ for F in webapp-6.0.0.57.1049268-Ubuntu_20.04-all/*.deb; do dpkg --unpack --no-t
|
||||
apt-get install -f -y --no-install-recommends
|
||||
apt-get install -y --no-install-recommends libapache2-mod-php7.4
|
||||
a2ensite kopano-webapp
|
||||
# cleanup
|
||||
apt-get autoclean
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
||||
rm -rf webapp-6.0.0.57.1049268-Ubuntu_20.04-all
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
docker run -d --rm --name www -p80:80 -v/root/kopano-docker/dist:/usr/local/apache2/htdocs httpd
|
||||
docker build --no-cache --progress=plain -t webapp .
|
||||
docker build -t webapp .
|
||||
docker run --rm -it --name webapp \
|
||||
-p8080:80 \
|
||||
webapp
|
||||
docker run -it --name webapp -p8080:80 webapp
|
||||
docker logs -f webapp
|
||||
docker exec -it webapp bash
|
||||
|
||||
|
||||
@@ -5,22 +5,29 @@ RUN <<EOF
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export TZ=Europe/Berlin
|
||||
apt-get update
|
||||
apt-get install -y tzdata wget gnupg
|
||||
EOF
|
||||
apt-get install -y --no-install-recommends tzdata wget gnupg apache2 ca-certificates
|
||||
update-ca-certificates
|
||||
# install php7-mapi and dependencies
|
||||
wget --no-verbose -P/tmp http://bldr/core-11.0.2.50.507cbae-Ubuntu_20.04-amd64.tar.gz
|
||||
tar xzf /tmp/core-11.0.2.50.507cbae-Ubuntu_20.04-amd64.tar.gz
|
||||
for F in core-11.0.2.50.507cbae-Ubuntu_20.04-amd64/*.deb; do dpkg --unpack --no-triggers $F; done
|
||||
apt-get install -f -y --no-install-recommends
|
||||
# install z-push
|
||||
# wget --no-check-certificate -qO - https://download.kopano.io/zhub/z-push:/final/Ubuntu_20.04/Release.key | apt-key add -
|
||||
wget -qO - https://download.kopano.io/zhub/z-push:/final/Ubuntu_20.04/Release.key | apt-key add -
|
||||
echo "deb https://download.kopano.io/zhub/z-push:/final/Ubuntu_20.04/ /" >/etc/apt/sources.list.d/z-push.list
|
||||
apt-get update
|
||||
apt-get install -y z-push-kopano z-push-config-apache z-push-backend-kopano
|
||||
apt-get install -y z-push-kopano z-push-backend-kopano z-push-config-apache z-push-config-apache-autodiscover
|
||||
apt-get install -f -y --no-install-recommends
|
||||
# cleanup
|
||||
apt-get autoclean
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
||||
rm -rf core-11.0.2.50.507cbae-Ubuntu_20.04-amd64
|
||||
EOF
|
||||
# use envsubst in entrypoint script to convert config templates to actual config files
|
||||
COPY --chmod=0775 entrypoint.sh /entrypoint.sh
|
||||
EXPOSE 80
|
||||
VOLUME /etc/z-push
|
||||
VOLUME /var/lib/z-push
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["apache2", "-DFOREGROUND"]
|
||||
|
||||
@@ -2,16 +2,11 @@
|
||||
# export DOCKER_BUILDKIT=1
|
||||
docker run -d --rm --name www -p80:80 -v/root/kopano-docker/dist:/usr/local/apache2/htdocs httpd
|
||||
docker build --no-cache --progress=plain -t z-push .
|
||||
docker run --rm -it --name z-push \
|
||||
-e "MAIL_DOMAIN=ads65.de" \
|
||||
-e "APACHE_RUN_DIR=/var/www" \
|
||||
-e "APACHE_RUN_USER=www-data" \
|
||||
-e "APACHE_RUN_GROUP=www-data" \
|
||||
-e "APACHE_LOG_DIR=/var/log" \
|
||||
-e "APACHE_PID_FILE=/var/run/apache2/apache2.pid" \
|
||||
z-push
|
||||
docker build -t z-push .
|
||||
docker run --rm -it --name z-push -p8081:80 z-push bash
|
||||
docker logs -f z-push
|
||||
docker exec -it z-push bash
|
||||
docker run --rm -it ubuntu:20.04
|
||||
|
||||
docker kill z-push
|
||||
docker rm z-push
|
||||
|
||||
8
z-push/entrypoint.sh
Normal file
8
z-push/entrypoint.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
export APACHE_RUN_DIR=/var/www
|
||||
export APACHE_RUN_USER=www-data
|
||||
export APACHE_RUN_GROUP=www-data
|
||||
export APACHE_LOG_DIR=/var/log/apache2
|
||||
export APACHE_PID_FILE=/var/run/apache2/apache2.pid
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user