Sign inSign up

dockette/docshot

Sponsored OSS

By dockette

•Updated about 17 hours ago

šŸ“ø One HTTP call turns any document, deck, e-mail, archive, audio or video into a picture

Image
0

165

dockette/docshot repository overview

⁠Dockette / Docshot

šŸ“ø One HTTP call turns any document, spreadsheet, deck, e-mail, archive, audio or video into a picture.

šŸ•¹ f3l1x.io⁠ | šŸ’» f3l1x⁠ | 🐦 @xf3l1x⁠


Upload a document, get back a picture: one page, a contact sheet, or a ZIP of every page. 300+ formats — PDF, Office, HTML, Markdown, e-mail, images, video, audio, archives, fonts. Self-hosted, one container. Great for thumbnails, previews and vision LLMs.

⁠Quick start

docker run -d -p 3000:3000 dockette/docshot
curl -F [email protected] localhost:3000/upload       -o report.png   # first page
curl -F [email protected]   localhost:3000/upload/grid  -o deck.png     # contact sheet
curl -F [email protected] localhost:3000/upload/pages -o report.zip   # all pages

⁠Usage

Upload (POST)Link (GET)
One page/upload/render
Contact sheet/upload/grid/render/grid
All pages (ZIP)/upload/pages/render/pages
Metadata (JSON)/upload/info/info

Common parameters: page, width, height, fit, format (png, jpeg, webp, auto) and preset (thumb, card, preview, og).

curl -F [email protected] 'localhost:3000/upload?time=1:23&width=640&format=webp' -o frame.webp

GET links work straight in <img>, once a source is enabled:

<img src="http://localhost:3000/render?path=offer.docx&preset=thumb">
SourceEnable with
?path=…DOCSHOT_ROOT + a mounted directory
?s3=bucket/keyDOCSHOT_S3_*
?url=https://…DOCSHOT_FETCH_ALLOW=<regexp>

Errors are JSON ({"error", "code", "status"}). GET /formats lists every supported extension; /healthz, /readyz, /metrics and /version are there for monitoring.

⁠Configuration

EnvDefault
DOCSHOT_DEFAULT_DPI150
DOCSHOT_MAX_BYTES104857600Upload limit
DOCSHOT_TIMEOUT_SECONDS180
DOCSHOT_CACHE_MB256In-memory cache
DOCSHOT_ROOT–Directory for ?path=
DOCSHOT_FETCH_ALLOW–URLs ?url= may fetch
DOCSHOT_SIGN_KEY–Require signed GET links

All options are in internal/server/server.go⁠.

Warning

There is no authentication. Keep docshot on a private network, or set `DOCSHOT_SIGN_KEY`.

⁠How it works

A small Go server on :3000 runs Gotenberg⁠ inside the same container. Documents become PDF (LibreOffice, Chromium) and PDFium draws the page; images, video and audio go through Go and ffmpeg. JavaScript and network access are off for untrusted input.

⁠Versions

Releases are dated: YYYY.MM.DD (see VERSION⁠).

Tag
dockette/docshot:latestlatest master
dockette/docshot:2026.10.19a release — pin this
dockette/docshot:sha-<sha>exact commit

To release, run make release, commit and push; CI publishes the image and the GitHub release.

⁠Development

make up          # build + start on :9994
make test-unit   # go vet + unit tests
make lint        # gofmt, staticcheck, govulncheck, shellcheck, hadolint
make smoke       # render one page with the built image
make test        # end-to-end checks

See how to contribute⁠ to this package.

This package is currently maintaining by these authors.

⁠

Consider to support⁠ f3l1x. Also thank you for using this package.

Tag summary

Content type

Image

Digest

sha256:801d5ec9c…

Size

760.3 MB

Last updated

about 17 hours ago

docker pull dockette/docshot