Sign inSign up

jxlwqq/http-echo

By jxlwqq

•Updated over 4 years ago

HTTP Echo is a go web server that echos back the arguments given to it. Multi-platform supported.

Image
3

100K+

jxlwqq/http-echo repository overview

⁠http-echo

Testing Docker Pulls

HTTP Echo is a go web server that echos back the arguments given to it. This is especially useful for demos or a more extensive "hello world" application in Docker or Kubernetes.

Inspired by hashicorp/http-echo⁠. Building multi-architecture docker images with Docker Buildx⁠. Apple chip/arm64's users cheers :).

NOTE: There are some differences between jxlwqq/http-echo⁠ and hashicorp/http-echo⁠:

Differencejxlwqq/http-echo⁠hashicorp/http-echo⁠
default expose port:8080:5678
args"--text=hello""-text=hello"
build withgin, pflagnet/http, flag
multi-platform supportyesno
⁠Local

The default port is 8080, but this is configurable via the --addr flag:

# go build
make go-build
# start the server
./http-echo --text="hello world" --addr=:8080

Then visit http://localhost:8080/⁠ in your browser.

⁠Docker

To run the server in Docker:

# docker pull
docker pull jxlwqq/http-echo:latest
# docker run
docker run -p 8080:8080 jxlwqq/http-echo:latest --text="hello world"

Then visit http://localhost:8080/⁠ in your browser.

⁠Kubernetes

To run the server in Kubernetes:

kubectl apply -f samples/kubernetes/hello-world/deployment.yaml
kubectl apply -f samples/kubernetes/hello-world/service.yaml
kubectl port-forward services/http-echo 8080:8080

Then visit http://localhost:8080/⁠ in your browser.

⁠Istio

To run the server with Istio in Kubernetes:

kubectl apply -f samples/istio/http-echo/echo-v1-deployment.yaml
kubectl apply -f samples/istio/http-echo/echo-v2-deployment.yaml
kubectl apply -f samples/istio/http-echo/echo-service.yaml

kubectl apply -f samples/istio/http-echo/istio-gateway.yaml
kubectl apply -f samples/istio/http-echo/istio-virtual-service.yaml
kubectl apply -f samples/istio/http-echo/istio-destination-rule.yaml

Then visit http://localhost⁠ in your browser.

Tag summary

Content type

Image

Digest

Size

7.9 MB

Last updated

over 4 years ago

docker pull jxlwqq/http-echo