You should put all this in a single layer (i.e. The first one is not in direct relation to your problem, but you are creating way too many layers (one for each RUN command) for something as simple as adding a driver to your image. There are at least three things wrong with your Dockerfile IMO. What went wrong here? Is there anything wrong in the dockerfile ? The command '/bin/sh -c apt-get install openssl libssl-dev libcurl4-openssl-dev' returned a non-zero code: 1 Īt one point it shows following message and stops the execution: Need to get 2213 kB of archives.Īfter this operation, 9593 kB of additional disk space will be used. Then it should install mongodb driver.īut when i run the following command docker build -t my-mongo. RUN echo "extension=mongodb.so" > /usr/local/etc/php/php.ini RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini RUN apt-get install openssl libssl-dev libcurl4-openssl-dev To do that, i have created following dockerfile: FROM php:7.3-apache So i need to install mongodb driver in the php-apache container. I want to run a php script from this container and send some data to the mongodb container to save the data in mongodb database. I need another docker container which will have php and apache installed.
0 Comments
Leave a Reply. |