forked from ekondayan/docker-3cx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·32 lines (23 loc) · 826 Bytes
/
build.sh
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
#!/bin/bash
VERSION=16.0.8.9
USER=farfui
docker rmi ${USER}/3cx:${VERSION}
docker build \
--force-rm \
--no-cache \
--build-arg BUILD_STRING="$(date -u)" \
--build-arg BUILD_DATE="$(date +%d-%m-%Y)" \
--build-arg BUILD_TIME="$(date +%H:%M:%S)" \
-t 3cx_stage1 .
docker run \
-d \
--privileged \
--name 3cx_stage1_c 3cx_stage1
docker exec 3cx_stage1_c bash -c \
" systemctl mask systemd-logind console-getty.service container-getty@.service getty-static.service getty@.service serial-getty@.service getty.target \
&& systemctl enable nginx exim4 postgresql \
&& echo 1 | apt-get -y install 3cxpbx"
docker stop 3cx_stage1_c
docker commit 3cx_stage1_c ${USER}/3cx:${VERSION}
docker rm 3cx_stage1_c
docker rmi 3cx_stage1