Error in building docker image from Dockerfile
Hi , I try to build docker image from Dockerfile but no luck.
The first time i try to build it with very simple docker command (docker build -f docker/Dockerfile .) but it shows yum-downloadonly not found, please see log below.
➜ flexisip git:(master) ✗ docker build -f docker/Dockerfile . Sending build context to Docker daemon 1.324GB Step 1/22 : FROM centos ........... No match for argument: yum-downloadonly Error: Unable to find a match: yum-downloadonly The command '/bin/sh -c yum -y install epel-release yum-downloadonly gdb' returned a non-zero code: 1
And then I tried to remove yum-downloadonly from Dockerfile, and it turned out to show another error. please see below.
➜ flexisip git:(master) ✗ docker build -f docker/Dockerfile . Sending build context to Docker daemon 1.324GB ......... Step 6/22 : RUN yum install -y --downloadonly --downloaddir=/opt bc-flexisip bc-flexisip-debuginfo bc-flexisip-jwe-auth-plugin ---> Running in fcc4f854c323 Extra Packages for Enterprise Linux Modular 8 - 53 kB/s | 79 kB 00:01 Error: Problem 1: cannot install the best candidate for the job
- nothing provides libxerces-c-3.1.so()(64bit) needed by bc-flexisip-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides libnetsnmp.so.31()(64bit) needed by bc-flexisip-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides libnetsnmpagent.so.31()(64bit) needed by bc-flexisip-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides libnetsnmpmibs.so.31()(64bit) needed by bc-flexisip-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides libprotobuf.so.8()(64bit) needed by bc-flexisip-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides librpm.so.3()(64bit) needed by bc-flexisip-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides librpmio.so.3()(64bit) needed by bc-flexisip-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides libwrap.so.0()(64bit) needed by bc-flexisip-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides /usr/bin/python needed by bc-flexisip-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64 Problem 2: cannot install the best candidate for the job
- nothing provides libxerces-c-3.1.so()(64bit) needed by bc-flexisip-jwe-auth-plugin-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides libnetsnmp.so.31()(64bit) needed by bc-flexisip-jwe-auth-plugin-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides libnetsnmpagent.so.31()(64bit) needed by bc-flexisip-jwe-auth-plugin-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides libnetsnmpmibs.so.31()(64bit) needed by bc-flexisip-jwe-auth-plugin-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides libprotobuf.so.8()(64bit) needed by bc-flexisip-jwe-auth-plugin-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides librpm.so.3()(64bit) needed by bc-flexisip-jwe-auth-plugin-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides librpmio.so.3()(64bit) needed by bc-flexisip-jwe-auth-plugin-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
- nothing provides libwrap.so.0()(64bit) needed by bc-flexisip-jwe-auth-plugin-1:2.0.0-0.beta.30+f1a0f89c.el7.x86_64
Finally, I tried to change centos to centos:7 in Dockerfile because I notice that flexisip only support 7. the error was different from previous two, so I still stuck on it, please see below
Step 13/22 : RUN flexisip --dump-default all > /etc/flexisip/flexisip.conf ---> Running in 1f777c0e7162 terminate called after throwing an instance of 'std::regex_error' what(): regex_error /bin/sh: line 1: 6 Aborted flexisip --dump-default all > /etc/flexisip/flexisip.conf
How do I build docker image from Dockerfile?