This Docker image sets up a simple HTTP server using Nginx that responds with a "404 Not Found" error for every request.
To use this image, you can pull it from Docker Hub by running the following command:
docker pull nards/docker_404
To run the Docker container and expose the service on port 80, use the following command:
docker run -d -p 80:80 nards/docker_404
Once the container is running, you can access the service by opening a web browser and navigating to http://localhost. Every request to the server will receive a "404 Not Found" response.
By default, the server returns a simple HTML page with the "404 Not Found" error message. You can customize the error page by modifying the index.html file in the container's /usr/share/nginx/html/ directory.
You have the option to customize the branding of the 404 error page by changing the default logo. There are two methods you can use:
Using the LOGO_URL Environment Variable: Set the LOGO_URL environment variable to specify the URL of the image you want to use as the logo. This image will replace the default logo on the 404 error page.
Mounting a Local Logo File: Alternatively, you can provide a local logo file and mount it into the Docker container. The local logo file should be in PNG format and named logo.png. Mount it to the path /usr/share/nginx/html/logo.png within the container.
Whichever method you choose, the customized logo will be displayed on the 404 error page.
Please note that if both the LOGO_URL environment variable and a local logo file are provided, the LOGO_URL takes precedence, and the local logo file will be ignored.
If you have any suggestions, improvements, or issues, feel free to open an issue or submit a pull request on the GitHub repository.
This project is licensed under the MIT License.
Content type
Image
Digest
sha256:4fcc1cf10…
Size
54.6 MB
Last updated
over 3 years ago
docker pull nards/docker_404