Samsara is an ancient content management system I wrote back when the
internet was fresh and Python programmers were still reeling from not
having to import string any more. You probably don't want to use it, but
I've Dockerized it because I still use it on one site, and Dockerizing
means I can freeze its dependencies and never again
have to pick through 1,851 files that suddenly changed because libxml2
started inserting a carriage return after the <body> element for
some reason.
Usually you'd mount a directory into the container for Samsara to work on, but I put a small example site in the container so you can try things out. Run the following command to serve an example site on http://localhost:2420/ and marvel at my 2007 web design:
docker run --rm -it -p 2420:2420/tcp gbenson/samsara server example
Hit Ctrl-C to kill it when you're done. You can also fetch individual pages, to debug things:
docker run --rm -it gbenson/samsara get example /
You can generate a static site too, but you'll have to mount a directory into the container for Samsara to write the files into:
mkdir out
docker run --rm -it --mount type=bind,src=$(pwd)/out,target=/work/out gbenson/samsara spider example out
For website updates I cd into a directory containing the XML
version of my site (web) and the directory I'll build into
(staging), and I run the commands with my out-of-container working
directory mounted onto the container's default working directory
(/work). Doing things that way keeps relative paths the same:
docker run --rm -it --mount type=bind,src=$(pwd),target=/work -p 2420:2420/tcp gbenson/samsara server web
docker run --rm -it --mount type=bind,src=$(pwd),target=/work gbenson/samsara spider web staging
I've scripts to do the heavy lifting for me, but you get the picture.
Content type
Image
Digest
sha256:b0881257e…
Size
135.5 MB
Last updated
over 3 years ago
docker pull gbenson/samsara