Docker Community Forums

Share and learn in the Docker community.

Problem with httpd official image

Please I need help!

I can’t make the Apache 2 httpd image work.
https://hub.docker.com/_/httpd

my system:
Linux Ubuntu Server 18.04
Docker 19.03.6

In the description it says:

Without a Dockerfile

If you don’t want to include a Dockerfile in your project, it is sufficient to do the following:

$ docker run -dit --name my-apache-app -p 8080:80 -v "$PWD":/usr/local/apache2/htdocs/ httpd:2.4

so for testing purposes I did:

  1. create a test user
  2. made a www directory
  3. createt a hallo world (index.html) file ind the www directory
  4. docker run -dit --name test -p 4444:80 -v /home/test/www/:/usr/local/apache2/htdocs/ httpd

But when I try to reach localhost:4444 i only get: url not found

I checked in the Docker Image the www-directory is mounted and the html-file is in the folder

thanks for help

On some older browsers you have to enter http://localhost:4444.

an update of the docker img. did the trick

SOLVED