Sign inSign up

traykovski/websh

By traykovski

•Updated 2 days ago

websh 3.6 (Tcl web framework) for amd64/arm64: CGI interpreter or Apache httpd + mod_websh

Image
Languages & frameworks
0

9.4K

traykovski/websh repository overview

⁠Quick reference

⁠Quick reference (cont.)

⁠What is websh?

Websh is a rapid development environment for building powerful and reliable web applications. It is a standard Tcl extension and is released as Open Source Software. Websh is versatile and handles everything from HTML generation to data-base driven one-to-one page customization.

websh was originally developed by Netcetera and contributed to the Apache Software Foundation in 2001. These images contain websh 3.6.0b5, built from the last commit of the websh repository (2018), which adds Apache 2.4 support and builds with current compilers. websh supports Tcl 8.x only.

The images are built on traykovski/tcl⁠: websh is compiled on the Tcl -dev image and copied into the matching runtime image.

TclStatusThreads
8.6.18current (latest)yes
8.5.19last 8.5 releaseno
8.5.13legacy, for applications pinned to this patch levelno

⁠How to use this image

⁠Start an interactive websh

$ docker run -it --rm traykovski/websh:3.6

websh is also a Tcl package: package require websh works in plain tclsh.

⁠Serve .ws3 pages with Apache

# htdocs/hello.ws3
web::command default {
    web::put "hello [web::param name]"
}
web::dispatch
$ docker run -d --name some-websh -p 8080:80 -v "$PWD/htdocs":/var/www/html traykovski/websh:3.6-apache

Then visit http://localhost:8080/hello.ws3.

⁠... via docker compose⁠

Example compose.yaml for websh:

services:
  web:
    image: traykovski/websh:3.6-apache
    ports:
      - 8080:80
    volumes:
      - ./htdocs:/var/www/html

Run docker compose up and visit http://localhost:8080/hello.ws3.

⁠Create a Dockerfile for your application

FROM traykovski/websh:3.6-apache
COPY htdocs/ /var/www/html/

⁠How to extend this image

By default each .ws3 file gets its own interpreter, like CGI. For shared interpreter pools or templated .html, add a WebshConfig file to the Apache configuration, for example in /etc/apache2/conf-enabled/ (Debian) or /etc/httpd/conf.d/ (Rocky Linux).

⁠Caveats

  • The Apache images run httpd with the prefork MPM, which keeps Tcl in a process's main thread: Tcl 8.5's stack check misbehaves in worker threads. Keep prefork if you replace the configuration.
  • Logs go to the container output (docker logs).

⁠Image Variants

The traykovski/websh images come in many flavors, each designed for a specific use case.

⁠traykovski/websh:<version>

This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. Debian trixie slim with the websh interpreter and the websh Tcl package; use it for CGI, scripts, or as a base.

⁠traykovski/websh:<version>-alpine

The same, based on the popular Alpine Linux project⁠: the smallest image. It uses musl libc⁠ instead of glibc, so compiled extensions must be built for musl.

⁠traykovski/websh:<version>-rocky9-minimal, traykovski/websh:<version>-rocky8-minimal

The same, based on Rocky Linux⁠ minimal, for applications that run on RHEL-family systems.

⁠traykovski/websh:<version>-apache

Debian slim with Apache httpd 2.4 and mod_websh: serves *.ws3 files under /var/www/html on port 80.

⁠traykovski/websh:<version>-rocky9-minimal-apache, traykovski/websh:<version>-rocky8-minimal-apache

The same with Rocky Linux's httpd.

⁠License

View license information for websh⁠ (Apache License 2.0) and Tcl⁠ (BSD-style) for the software contained in this image. Both, with websh's NOTICE, are included in every image under /usr/local/share/licenses/; the build files are MIT licensed.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, and Apache httpd in the -apache variants, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Tag summary

Content type

Image

Digest

sha256:9a33e66d7…

Size

32.3 MB

Last updated

2 days ago

docker pull traykovski/websh