I have attached my Dockerfile and the error I got. Kindly help me and teach me what went wrong.
My Dockerfile
My errors and commands
I have attached my Dockerfile and the error I got. Kindly help me and teach me what went wrong.
My Dockerfile
My errors and commands
Hi @shaarohi16
It is not working because you have not configured apache2 to listen on the given port (8087
in this case, but if you do the task again, it might be different.
Yes, you have to EXPOSE
it, but that’s not enough. apache2 is listening on port 80 unless you update its configuration files, as per How To Change Port Number in Apache in Ubuntu - Ubiq BI
Now since this is a dockerfile, you can’t do it manually using vi
. You have to use sed
to change the port number in the two files indicated in the above documentation.
When it is correctly configured, the curl test will return a mass of HTML