[SR-Users] Kamailio in Docker Compile Error

Sam Ware sam.ware at gmail.com
Fri Jan 10 02:21:37 CET 2020


I am attempting to create my own docker image on Centos 7.  During the
build, I get the following error message during the "make all" phase.
----------------------------------------------------------------------
CC (gcc) [kamailio]             core/cfg.tab.o
LD (gcc) [kamailio]             kamailio
make[1]: which: Command not found
make[1]: which: Command not found
make[1]: which: Command not found
make[1]: which: Command not found
make[1]: which: Command not found
make[1]: which: Command not found
CC (gcc) [M db_mysql.so]                km_dbase.o
km_dbase.c:36:19: fatal error: mysql.h: No such file or directory
 #include <mysql.h>
                   ^
compilation terminated.
make[1]: *** [km_dbase.o] Error 1
make: *** [modules] Error 1
------------------------------------------------------------------------

I checked and the mysql.h exists in the /usr/include/mysql directory.

Any thoughts?

FYI, here is my Dockerfile

FROM centos:7
MAINTAINER “Sam D Ware” sware at o1.com
ENV container docker
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in ; do [ $i ==
systemd-tmpfiles-setup.service ] || rm -f $i; done);
RUN rm -rf /lib/systemd/system/multi-user.target.wants/ \
    && rm -rf /etc/systemd/system/.wants/ \
    && rm -rf /lib/systemd/system/local-fs.target.wants/ \
    && rm -f /lib/systemd/system/sockets.target.wants/udev \
    && rm -f /lib/systemd/system/sockets.target.wants/initctl \
    && rm -rf /lib/systemd/system/basic.target.wants/ \
    && rm -f /lib/systemd/system/anaconda.target.wants/*
VOLUME [ “/sys/fs/cgroup”]
RUN yum -y install epel-release
RUN yum -y update
RUN yum -y install git-core gcc gcc-c++ flex bison mysql-devel
RUN yum -y install mariadb-devel hiredis hiredis-devel curl nss make
WORKDIR /usr/local/src/
RUN git clone --depth 1 --no-single-branch
https://github.com/kamailio/kamailio kamailio
WORKDIR /usr/local/src/kamailio/
RUN git checkout -b 5.3 origin/5.3
RUN make cfg
COPY modules.lst /usr/local/src/kamailio/src/
RUN make all
RUN make install
RUN groupadd kamailio
RUN adduser --system -g kamailio --shell /bin/false -c "Kamailio" --home
/var/run/kamailio kamailio
RUN cp /usr/local/src/kamailio/pkg/kamailio/obs/kamailio.sysconfig
/etc/sysconfig/kamailio
COPY kamailio.service /etc/systemd/system/kamailio.service
RUN yum clean all; systemctl enable kamailio
CMD ["/usr/sbin/init"]

-- 
Sam  D Ware
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200109/aef5e2b2/attachment.html>


More information about the sr-users mailing list