HUB
Sign inSign up
wetty-echo-server logo

boeboe/wetty-echo-server

By boeboe

•Updated almost 6 years ago

Image
0

320

boeboe/wetty-echo-server repository overview

⁠Wetty Echo Server

⁠Introduction

This docker container is created for demo purposes. It contains a TCP, UDP and HTTP based echo server and provides Web based terminal access into the container. The 4 different services offered, can be enabled or disabled at preference. The contiainer is based on Alpine Linux and has two flavors: a slim version without extra debug tools and a fat version with debug tools.

This container is useful for demoing and or debugging service mesh or other intra service network communication scenario's, without having to deploy a full blown microservice based application. The container can act both as the client (netcat for tcp/udp/http or curl for http) and a server. The servers are written in Javascript.

The web based terminal is based on wetty⁠. A user account admin with password admin has been created for terminal access.

In order to provide proper container support for multiple processes running, dumb-init⁠ is used as a simple process supervisor and init system designed to run as PID 1 inside minimal container.

⁠Github & dockerhub

The source code and docker containers are available at the following locations.

⁠Usage

⁠Environment variables

The following docker ENV variables can be used to tweak the behavior of this container.

ENV VariableDefaultUsage
WETTY_ENABLEDtrueenable web terminal
WETTY_PORT3000web terminal port
TCP_ECHO_ENABLEDtrueenable tcp echo server
TCP_ECHO_HOST0.0.0.0tcp echo server host
TCP_ECHO_PORT3001tcp echo server port
UDP_ECHO_ENABLEDtrueenable udp echo server
UDP_ECHO_HOST0.0.0.0udp echo server host
UDP_ECHO_PORT3002udp echo server port
HTTP_ECHO_ENABLEDtrueenable http echo server
HTTP_ECHO_HOST0.0.0.0http echo server host
HTTP_ECHO_PORT3003http echo server port
⁠Docker run

In order to run this container with the defaults (all services enabled):

$ docker run -i -t --rm -p=18080:3000 -p=18081:3001 -p=18082:3002/udp -p=18083:3003 --name="wetty-echo-server" boeboe/wetty-echo-server

To run the container with only wetty and http echo enabled:

$ docker run -i -t --rm -p=18080:3000 -p=18083:3003 -e TCP_ECHO_ENABLED=false -e UDP_ECHO_ENABLED=false --name="wetty-echo-server" boeboe/wetty-echo-server
⁠Termanal usage

The user credentials for the web based terminal access method are:

username: admin
password: admin

The terminal is accessible on the following url:

url_terminal: http://<host>:18080/wetty

An example on on how to use the container as both client and server.

screeshot wetty terminal

⁠Installed tooling

There are two versions of this docker container. A slim and a fat version, the latter containing extra debugging and demo tooling.

Current version is 1.0.0.

Version tagTools installed
1.0.0dumb-init openssh-client sshpass curl netcat-openbsd jq
1.0.0-dbgbash tree vim nano strace iputils wget httpie net-tools socat tcpdump bind-tools iproute2 tcptraceroute iperf3

Extra Alpine packages⁠ can be installed on the fly with the package manager apk.

$ apk add -U zsh 

⁠Note

This container is purely used for demo purposes and not meant for production environments at all.

Tag summary
Recent tags
Content type
Image
Digest
Size
35.1 MB
Last updated
almost 6 years ago
docker pull boeboe/wetty-echo-server:1.0.0