Sign inSign up

nards/docker_404

By nards

Updated about 2 years ago

A docker 404 not found service

Image
0

1.1K

nards/docker_404 repository overview

Docker Image Version (latest semver) Docker Image Size (latest semver) Docker Pulls Docker Stars GitHub Repo forks GitHub Repo stars

GitHub Workflow Status GitHub Workflow Status GitHub issues GitHub pull requests GitHub commits since latest release (by SemVer) GitHub Licence

Docker 404 Service

This Docker image sets up a simple HTTP server using Nginx that responds with a "404 Not Found" error for every request.

Usage

Pull the Docker Image

To use this image, you can pull it from Docker Hub by running the following command:

docker pull nards/docker_404
Run the Docker Container

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
Access the Service

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.

Customization

Changing the Error Page

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.

Branding

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:

  1. 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.

  2. 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.

Contributing

If you have any suggestions, improvements, or issues, feel free to open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License.

Tag summary

Content type

Image

Digest

sha256:4fcc1cf10

Size

54.6 MB

Last updated

over 3 years ago

docker pull nards/docker_404