[sr-dev] git:master:c5ffc265: Merge pull request #1258 from sergey-safarov/alpine

GitHub noreply at github.com
Sat Sep 30 14:23:28 CEST 2017


Module: kamailio
Branch: master
Commit: c5ffc265cf83c7e329ee8d21c3bafba78b670c58
URL: https://github.com/kamailio/kamailio/commit/c5ffc265cf83c7e329ee8d21c3bafba78b670c58

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: GitHub <noreply at github.com>
Date: 2017-09-30T14:23:21+02:00

Merge pull request #1258 from sergey-safarov/alpine

pkg/kamailio/alpine_docker: Docker args now passed to kamailio #1252

---

Modified: pkg/kamailio/alpine/kamailio.cfg
Modified: pkg/kamailio/alpine_docker/Dockerfile
Modified: pkg/kamailio/alpine_docker/README.md
Modified: pkg/kamailio/alpine_docker/build.sh
Removed: pkg/kamailio/alpine_docker/entrypoint.sh

---

Diff:  https://github.com/kamailio/kamailio/commit/c5ffc265cf83c7e329ee8d21c3bafba78b670c58.diff
Patch: https://github.com/kamailio/kamailio/commit/c5ffc265cf83c7e329ee8d21c3bafba78b670c58.patch

---

diff --git a/pkg/kamailio/alpine/kamailio.cfg b/pkg/kamailio/alpine/kamailio.cfg
index a8ca9990e9..6f91c23492 100644
--- a/pkg/kamailio/alpine/kamailio.cfg
+++ b/pkg/kamailio/alpine/kamailio.cfg
@@ -28,7 +28,6 @@ loadmodule	"rr.so"
 loadmodule	"maxfwd.so"
 loadmodule	"usrloc.so"
 loadmodule	"registrar.so"
-loadmodule	"mi_fifo.so"
 loadmodule	"pv.so"
 loadmodule	"xlog.so"
 
@@ -38,7 +37,6 @@ loadmodule	"xlog.so"
 
 modparam ( "usrloc", "db_mode", 0 )
 modparam ( "rr", "enable_full_lr", 1 )
-modparam ( "mi_fifo", "fifo_name", "/var/run/kamailio/kamailio_fifo")
 
 
 #--------------------------------------------------------
diff --git a/pkg/kamailio/alpine_docker/Dockerfile b/pkg/kamailio/alpine_docker/Dockerfile
index 7b55b404ff..5933ce2993 100644
--- a/pkg/kamailio/alpine_docker/Dockerfile
+++ b/pkg/kamailio/alpine_docker/Dockerfile
@@ -1,6 +1,5 @@
 FROM scratch
 
 ADD kamailio_img.tar.gz /
-COPY entrypoint.sh /
 
-ENTRYPOINT ["/entrypoint.sh"]
+ENTRYPOINT ["kamailio", "-DD", "-E"]
diff --git a/pkg/kamailio/alpine_docker/README.md b/pkg/kamailio/alpine_docker/README.md
index c5c7e074e0..ffc1a67702 100644
--- a/pkg/kamailio/alpine_docker/README.md
+++ b/pkg/kamailio/alpine_docker/README.md
@@ -6,19 +6,13 @@ Size of container decreased to 50MB (23MB compressed)
 Significantly increased security - removed all libs except libc, busybox, tcpdump, dumpcap, kamailio and dependent libs.
 Docker container is created useing Alpine linux packaging
 
-Used environment variables
---------------------------
-
-1. ```SHM_MEMORY``` - amount of shared memory to allocate for the running Kamailio server (in Mb), default value 64Mb;
-2. ```PKG_MEMORY``` - amount of per-process (package) memory to allocate for Kamailio (in Mb), default value 8Mb
-
 Usage container
 ---------------
 
 ```sh
 docker run --net=host --name kamailio \
            -v /etc/kamailio/:/etc/kamailio \
-           kamailio/kamailio
+           kamailio/kamailio -m 64 -M 8
 ```
 
 systemd unit file
diff --git a/pkg/kamailio/alpine_docker/build.sh b/pkg/kamailio/alpine_docker/build.sh
index 3d9c52a2c0..510325b199 100755
--- a/pkg/kamailio/alpine_docker/build.sh
+++ b/pkg/kamailio/alpine_docker/build.sh
@@ -119,7 +119,6 @@ make_image_tar() {
     cd $BUILD_ROOT
     tar xzf $TMP_TAR
     /bin/busybox --install -s bin
-    sed -i -e '/mi_fifo/d' etc/kamailio/kamailio.cfg
     tar czf /usr/src/kamailio/pkg/kamailio/alpine_docker/$IMG_TAR *
 }
 
diff --git a/pkg/kamailio/alpine_docker/entrypoint.sh b/pkg/kamailio/alpine_docker/entrypoint.sh
deleted file mode 100755
index 3720d06984..0000000000
--- a/pkg/kamailio/alpine_docker/entrypoint.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-#
-#  Created by Sergey Safarov <s.safarov at gmail.com>
-#
-
-SHM_MEMORY=${SHM_MEMORY:-64}
-PKG_MEMORY=${PKG_MEMORY:-8}
-trap 'kill -SIGTERM "$pid"' SIGTERM
-
-/usr/sbin/kamailio -DD -E -m $SHM_MEMORY -M $PKG_MEMORY &
-pid="$!"
-
-wait $pid
-exit 0




More information about the sr-dev mailing list