Sign inSign up

danny27071993/fake-http-server

By danny27071993

•Updated about 2 years ago

HTTP server which returns fake data

Image
Developer tools
Web servers
0

387

danny27071993/fake-http-server repository overview

⁠FAKE HTTP Server

Release pipeline

Docker Image Size GitHub repo size GitHub code size in bytes

GitHub commit activity GitHub Downloads (all assets, all releases) Docker Pulls

Fake http server wich returns the hostname of the running machine and the node name shared via environment variables

⁠Use it

Run the image specifing the SERVER_NAME and publish the http port

With docker

docker run -it --rm --env SERVER_NAME=NODE_1 --publish 9000:3000 danny27071993/fake-http-server

With docker compose

version: '3.3'

networks:
    network:
        driver: bridge

services:
    fake-http-server:
        image: danny27071993/fake-http-server
        ports:
            - 9000:3000
        healthcheck:
            test: curl 127.0.0.1:3000/health
            interval: 30s
            timeout: 3s
            retries: 5
        networks:
            - network

⁠Build from code

Build docker image

docker build -t danny27071993/fake-http-server .

Run a container based on the image

docker run -it --rm --env SERVER_NAME=NODE_1 --publish 9000:3000 danny27071993/fake-http-server

Check the connectivity

curl 127.0.0.1:9000

Push the image to docker hub

docker push danny27071993/fake-http-server

⁠Follow me

YouTube GitHub LinkedIn

⁠LICENSE

GitHub License

⁠Version

GitHub Tag GitHub Release Docker Image Version

Last update 11/08/2024

Tag summary

Content type

Image

Digest

sha256:3d4bf1524…

Size

47.6 MB

Last updated

about 2 years ago

docker pull danny27071993/fake-http-server