I made a build using this
FROM ubuntu:18.04

RUN apt update
RUN apt install -y build-essential git bison flex pkg-config libmysqlclient-dev libssl-dev libpcre3-dev mysql-client

RUN mkdir -p /usr/local/src/kamailio-devel && \
  cd /usr/local/src/kamailio-devel && \
  git clone --depth 1 -b 5.3.1 https://github.com/kamailio/kamailio kamailio
RUN cd /usr/local/src/kamailio-devel/kamailio && \
  make cfg && \
  make include_modules="db_mysql dialplan" cfg && \
  make all && \
  make install


  Kjeld

Den fre. 10. jan. 2020 kl. 02.23 skrev Sam Ware <sam.ware@gmail.com>:
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@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

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--

--------------------- Med Liberalistiske Hilsner ----------------------

   Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
   Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
   Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk