separated components
This commit is contained in:
1
build.sh
1
build.sh
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
# docker run -d --name apache -p80:80 -v/root/kopano/dist:/var/www/... apache
|
||||||
DOCKER_BUILDKIT=1 docker build -f kopano.dockerfile -t kopano .
|
DOCKER_BUILDKIT=1 docker build -f kopano.dockerfile -t kopano .
|
||||||
docker container prune -f
|
docker container prune -f
|
||||||
docker create --name kopano kopano:latest
|
docker create --name kopano kopano:latest
|
||||||
|
|||||||
15
build2.sh
Normal file
15
build2.sh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
# docker login --username baloan --password 'yZBCUs5&@?:.'
|
||||||
|
# docker run -d --name apache -p80:80 -v/root/kopano/dist:/var/www httpd
|
||||||
|
export DOCKER_BUILDKIT=1
|
||||||
|
cd ~/kopano/core; docker build -t core .
|
||||||
|
cd ~/kopano/webapp; docker build -t webapp .
|
||||||
|
cd ~/kopano/postfix; docker build -t postfix .
|
||||||
|
cd ~/kopano
|
||||||
|
# docker container prune -f
|
||||||
|
# docker create --name kopano kopano:latest
|
||||||
|
# docker export kopano | docker import - kopano:squashed
|
||||||
|
# docker run -d --name kopano kopano:squashed
|
||||||
|
# docker exec -it kopano bash
|
||||||
|
# docker stop kopano
|
||||||
|
# docker rm kopano
|
||||||
34
core/Dockerfile
Normal file
34
core/Dockerfile
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# syntax=docker/dockerfile:1.3-labs
|
||||||
|
FROM ubuntu:20.04
|
||||||
|
# install apt packages
|
||||||
|
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
|
||||||
|
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
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
||||||
|
rm -rf ~/core-11.0.2.50.507cbae-Ubuntu_20.04-amd64
|
||||||
|
EOF
|
||||||
|
# https://documentation.kopano.io/kopanocore_administrator_manual/configure_kc_components.html#configure-kopano-dagent-for-delivery-via-unix-socket
|
||||||
|
WORKDIR /root
|
||||||
|
EXPOSE 8443
|
||||||
|
VOLUME /var/lib/kopano/attachments
|
||||||
|
ENTRYPOINT ["/init"]
|
||||||
@@ -7,6 +7,7 @@ export DEBIAN_FRONTEND=noninteractive
|
|||||||
export TZ=Europe/Berlin
|
export TZ=Europe/Berlin
|
||||||
apt-get install -y tzdata z-push apache2 postfix spampd wget xz-utils
|
apt-get install -y tzdata z-push apache2 postfix spampd wget xz-utils
|
||||||
apt-get autoclean
|
apt-get autoclean
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
||||||
EOF
|
EOF
|
||||||
# install s6 process manager
|
# 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-noarch.tar.xz /tmp
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '3.1'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: mysql:latest
|
image: mysql:latest
|
||||||
|
|||||||
15
postfix/Dockerfile
Normal file
15
postfix/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# syntax=docker/dockerfile:1.3-labs
|
||||||
|
FROM ubuntu:20.04
|
||||||
|
# install apt packages
|
||||||
|
RUN <<EOF
|
||||||
|
apt-get update -y
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
export TZ=Europe/Berlin
|
||||||
|
apt-get install -y tzdata postfix spampd wget xz-utils
|
||||||
|
apt-get autoclean
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
||||||
|
EOF
|
||||||
|
WORKDIR /root
|
||||||
|
EXPOSE 25
|
||||||
|
VOLUME /var/spool/postfix
|
||||||
|
ENTRYPOINT ["/usr/sbin/postmulti -i %i -p start"]
|
||||||
15
postfix/docker-compose.yml
Normal file
15
postfix/docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
postfix:
|
||||||
|
image: postfix:latest
|
||||||
|
container_name: postfix
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- kopano
|
||||||
|
volumes:
|
||||||
|
- ~/kopano/postfix/etc:/etc/postfix
|
||||||
|
- spool:/var/spool/postfix
|
||||||
|
networks:
|
||||||
|
- kopano
|
||||||
|
volumes:
|
||||||
|
- spool:
|
||||||
25
webapp/Dockerfile
Normal file
25
webapp/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# syntax=docker/dockerfile:1.3-labs
|
||||||
|
FROM ubuntu:20.04
|
||||||
|
# install apt packages
|
||||||
|
RUN <<EOF
|
||||||
|
apt-get update -y
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
export TZ=Europe/Berlin
|
||||||
|
apt-get install -y tzdata z-push apache2 wget xz-utils
|
||||||
|
apt-get autoclean
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
||||||
|
EOF
|
||||||
|
# install kopano webapp
|
||||||
|
RUN <<EOF
|
||||||
|
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
|
||||||
|
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
|
||||||
|
apt-get clean
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
|
||||||
|
rm -rf ~/webapp-6.0.0.57.1049268-Ubuntu_20.04-all
|
||||||
|
EOF
|
||||||
|
WORKDIR /root
|
||||||
|
EXPOSE 80
|
||||||
|
VOLUME /var/lib/z-push
|
||||||
|
ENTRYPOINT ["/init"]
|
||||||
Reference in New Issue
Block a user