Giter VIP home page Giter VIP logo

404-container's Introduction

404 Container

It’s a super-compact container with the sole purpose of responding with HTTP 404. And it’s written in Rust and async-std.

Motivation

It mainly exists because I wanted a tiny-tiny performant default back-end for my HAProxy Ingress Kubernetes deployments.

The usual default k8s.gcr.io/defaultbackend-amd64 does not fit the bill quite well to my taste. Especially when its arm64 variant gives you a platform mismatch error, declaring the image’s platform is linux/amd64.

(At least, it has been doing it at the moment of writing this. Who knows why—it’s four years old.)

Also, there may be a room or a requirement for customization or extra configurability.

Usage

The container image is available as docker.io/aeron/404 and ghcr.io/Aeron/404. You can use both interchangeably.

docker pull docker.io/aeron/404
# …or…
docker pull ghcr.io/aeron/404

Container Running

Running a container is pretty straightforward:

docker -d --restart unless-stopped --name http-404 \
    --user=65534 \
    -p 80/8080:tcp \
    docker.io/aeron/404

By default, the containerized app listens on the 0.0.0.0:8080 address.

However, you can also provide the PORT environment variable with a desired port number value. Just like so:

docker -d --restart unless-stopped --name http-404 \
    --user=65534 \
    -e PORT=1080 \
    -p 80/1080:tcp \
    docker.io/aeron/404

Don’t forget about the unprivileged user trick. The container itself won’t enforce any specific UID.

404-container's People

Contributors

aeron avatar dependabot[bot] avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.