Skip to content

merchantprotocol/sulla-docker-websocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sulla WebSocket Echo Server

A simple WebSocket echo server built with websocketd - the tool that turns any command-line program into a WebSocket server.

What it does

This container runs a WebSocket server on port 8080 that:

  • Echoes back any message you send
  • Serves a built-in web UI for testing
  • Requires zero code - just configuration

How simple is it?

The entire Dockerfile is 12 lines:

FROM alpine
RUN apk add --no-cache wget unzip && \
    wget -q -O /tmp/websocketd.zip https://github.com/joewalnes/websocketd/releases/download/v0.4.1/websocketd-0.4.1-linux_amd64.zip && \
    unzip -q /tmp/websocketd.zip -d /tmp && \
    mv /tmp/websocketd /usr/local/bin/websocketd && \
    chmod +x /usr/local/bin/websocketd && \
    rm -rf /tmp/websocketd.zip && \
    apk del wget unzip
CMD ["websocketd", "--port=8080", "--staticdir=/www", "cat"]

That's it. The cat command echoes back what you send. WebSocketd handles all the WebSocket protocol stuff.

Quick start

# Clone and enter directory
cd sulla-docker-websocket

# Build and run with test UI
just restart "build www"

# Open http://localhost:8080 in your browser

Available commands

Command Description
just Show all commands
just build Build Docker image
just run Run container
just run-with-www Run with test UI mounted
just restart Restart container
just restart "build www" Rebuild with www
just stop Stop container
just logs View logs
just test-http Quick HTTP check
just push Push to Docker Hub

WebSocket URL

ws://localhost:8080/

Any message sent will be echoed back instantly.

Why this exists

  • Testing: Quick WebSocket endpoint for development
  • Debugging: Inspect WebSocket traffic with the web UI
  • Learning: Simplest possible WebSocket server example
  • Integration: Drop-in echo server for CI/CD pipelines

Docker Hub

docker run -p 8080:8080 byrdziak/sulla-websocket:latest

About

WebSocket server for Docker container communication with Sulla Desktop

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors