added core
This commit is contained in:
@@ -1,34 +1,29 @@
|
|||||||
# syntax=docker/dockerfile:1.3-labs
|
# syntax=docker/dockerfile:1.3-labs
|
||||||
FROM ubuntu:20.04
|
FROM ubuntu:20.04
|
||||||
# install apt packages
|
|
||||||
WORKDIR /root
|
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
apt-get update -y
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
export TZ=Europe/Berlin
|
export TZ=Europe/Berlin
|
||||||
apt-get install -y tzdata wget xz-utils
|
apt-get update
|
||||||
apt-get autoclean
|
apt-get install -y --no-install-recommends tzdata wget gnupg ca-certificates
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
update-ca-certificates
|
||||||
EOF
|
# install core
|
||||||
# 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
|
|
||||||
wget --no-verbose -P/tmp http://bldr/core-11.0.2.50.507cbae-Ubuntu_20.04-amd64.tar.gz
|
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
|
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
|
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 install -f -y --no-install-recommends
|
||||||
apt-get clean
|
# cleanup
|
||||||
|
apt-get autoclean
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
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
|
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
|
# 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
|
EXPOSE 8443
|
||||||
|
VOLUME /etc/kopano
|
||||||
VOLUME /var/lib/kopano/attachments
|
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'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
core:
|
server:
|
||||||
image: kopano
|
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:
|
postfix:
|
||||||
image: postfix
|
image: postfix
|
||||||
volumes:
|
volumes:
|
||||||
@@ -10,16 +31,36 @@ services:
|
|||||||
image: webapp
|
image: webapp
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- 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=true
|
||||||
- traefik.http.routers.webapp.tls.certResolver=default
|
- traefik.http.routers.webapp.tls.certResolver=default
|
||||||
volumes:
|
volumes:
|
||||||
- z-push:/var/lib/z-push
|
- z-push:/var/lib/z-push
|
||||||
|
depends_on:
|
||||||
|
- server
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
- traefik
|
||||||
db:
|
db:
|
||||||
image: mysql
|
image: mysql
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- database:/var/lib/mysql
|
- database:/var/lib/mysql
|
||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
external: true
|
||||||
volumes:
|
volumes:
|
||||||
- attachments:
|
- attachments:
|
||||||
- database:
|
- database:
|
||||||
|
|||||||
@@ -15,9 +15,10 @@ apt-get install -f -y --no-install-recommends
|
|||||||
wget --no-verbose -P/tmp http://bldr/webapp-6.0.0.57.1049268-Ubuntu_20.04-all.tar.gz
|
wget --no-verbose -P/tmp http://bldr/webapp-6.0.0.57.1049268-Ubuntu_20.04-all.tar.gz
|
||||||
tar xzf /tmp/webapp-6.0.0.57.1049268-Ubuntu_20.04-all.tar.gz
|
tar xzf /tmp/webapp-6.0.0.57.1049268-Ubuntu_20.04-all.tar.gz
|
||||||
for F in webapp-6.0.0.57.1049268-Ubuntu_20.04-all/*.deb; do dpkg --unpack --no-triggers $F; done
|
for F in webapp-6.0.0.57.1049268-Ubuntu_20.04-all/*.deb; do dpkg --unpack --no-triggers $F; done
|
||||||
apt-get install -f -y --no-install-recommends
|
apt-get install -f -y --no-install-recommends
|
||||||
apt-get install -y --no-install-recommends libapache2-mod-php7.4
|
apt-get install -y --no-install-recommends libapache2-mod-php7.4
|
||||||
a2ensite kopano-webapp
|
a2ensite kopano-webapp
|
||||||
|
# cleanup
|
||||||
apt-get autoclean
|
apt-get autoclean
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
||||||
rm -rf webapp-6.0.0.57.1049268-Ubuntu_20.04-all
|
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 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 --no-cache --progress=plain -t webapp .
|
||||||
docker build -t webapp .
|
docker build -t webapp .
|
||||||
docker run --rm -it --name webapp \
|
docker run -it --name webapp -p8080:80 webapp
|
||||||
-p8080:80 \
|
|
||||||
webapp
|
|
||||||
docker logs -f webapp
|
docker logs -f webapp
|
||||||
docker exec -it webapp bash
|
docker exec -it webapp bash
|
||||||
|
|
||||||
|
|||||||
@@ -5,22 +5,29 @@ RUN <<EOF
|
|||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
export TZ=Europe/Berlin
|
export TZ=Europe/Berlin
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y tzdata wget gnupg
|
apt-get install -y --no-install-recommends tzdata wget gnupg apache2 ca-certificates
|
||||||
EOF
|
update-ca-certificates
|
||||||
# install php7-mapi and dependencies
|
# install php7-mapi and dependencies
|
||||||
wget --no-verbose -P/tmp http://bldr/core-11.0.2.50.507cbae-Ubuntu_20.04-amd64.tar.gz
|
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
|
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
|
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
|
# 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 -
|
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
|
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 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
|
apt-get autoclean
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
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
|
EOF
|
||||||
# use envsubst in entrypoint script to convert config templates to actual config files
|
# use envsubst in entrypoint script to convert config templates to actual config files
|
||||||
|
COPY --chmod=0775 entrypoint.sh /entrypoint.sh
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
VOLUME /etc/z-push
|
||||||
VOLUME /var/lib/z-push
|
VOLUME /var/lib/z-push
|
||||||
ENTRYPOINT ["/bin/bash"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
CMD ["apache2", "-DFOREGROUND"]
|
||||||
|
|||||||
@@ -2,16 +2,11 @@
|
|||||||
# export DOCKER_BUILDKIT=1
|
# export DOCKER_BUILDKIT=1
|
||||||
docker run -d --rm --name www -p80:80 -v/root/kopano-docker/dist:/usr/local/apache2/htdocs httpd
|
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 build --no-cache --progress=plain -t z-push .
|
||||||
docker run --rm -it --name z-push \
|
docker build -t z-push .
|
||||||
-e "MAIL_DOMAIN=ads65.de" \
|
docker run --rm -it --name z-push -p8081:80 z-push bash
|
||||||
-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 logs -f z-push
|
docker logs -f z-push
|
||||||
docker exec -it z-push bash
|
docker exec -it z-push bash
|
||||||
|
docker run --rm -it ubuntu:20.04
|
||||||
|
|
||||||
docker kill z-push
|
docker kill z-push
|
||||||
docker rm 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