Comments on How to create Docker Images with a Dockerfile on Ubuntu 20.04 LTS
In this tutorial, I will show you how to create your own docker image with a dockerfile. A Dockerfile is a script that contains collections of commands and instructions that will be automatically executed in sequence in the docker environment for building a new docker images. As example, we will create a Nginx Web server with PHP-FPM.
6 Comment(s)
Comments
I got this error when building the image.
Step 13/19 : RUN sed -i -e 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' ${php_conf} && echo "\ndaemon off;" >> ${nginx_conf} ---> Running in 05769992b594sed: can't read /etc/php/7.2/fpm/php.ini: No such file or directoryThe command '/bin/sh -c sed -i -e 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' ${php_conf} && echo "\ndaemon off;" >> ${nginx_conf}' returned a non-zero code: 2
I got this error too. Do you have any solution?
Hi, I have followed the docker setup for PHP , and I'm struggling on step 4 When running : echo '
Nginx and PHP-FPM 7.4 inside Docker Container with Ubuntu 20.04 Base Image' > /webroot/index.html I get this output: -bash: /webroot/index.html: No such file or directory I get the same result when running as sudo as well.
Hi, I have followed the docker setup for PHP , and I'm struggling on step 4 When running :
echo '<h1>Nginx and PHP-FPM 7.4 inside Docker Container with Ubuntu 20.04 Base Image</h1>' > /webroot/index.html
I get this output:
-bash: /webroot/index.html: No such file or directory I get the same result when running as sudo as well.
Did you ever solve your issue?
I'm getting something similar: -bash: /webroot/index.html: permission denied. I get the same message when running as sudo as well.
Great tutorial, thanks. :)Only one thing to change: the directory needs to be named "webroot" rather than "/webroot" - otherwise it ends up in the root directory (or you end up with the same error as Mastermasashi).