By Joel Dare - Written September 13, 2025
I wanted to create a Docker container to quickly test a website in the Lynx web browser.
Lynx is a command-line UI (text based) web browser.
Here’s a Docker container that will bring up Alpine Linux, install Lynx, and start a shell so that you can open the browser. Normally you might run the browser directly in a container but I wanted to be be able to run it from the shell for various reasons.
# Build: docker build --tag lynx .
# Run: docker run -it --rm lynx
FROM alpine:latest
# Install lynx text-based web browser
RUN apk add --no-cache lynx
CMD ["sh"]
The comments at the top tell you how to build the container and then run it. Once you’ve started the container you can run Lynx with a command like:
lynx https://www.example.com
Want to build your next site in pure HTML and CSS? Join the free Five-Day Neat Starter Email Course and build a lean, production-ready page before Friday.
JoelDare.com © Dare Companies Dotcom LLC