LikeC4 Docker
LikeC4 Docker image is a self-contained environment for running LikeC4 commands and can be used as a drop-in replacement for likec4
CLI.
It is hosted in GitHub Container Registry and includes:
- Node.js (22.x)
- Graphviz (built from sources of the latest release)
- Playwright (latest)
- LikeC4 CLI (latest)
You can find the Dockerfile in the repository.
# Example: Help for export commanddocker run --rm -t ghcr.io/likec4/likec4 export png -h
To work with the container you need to mount the folder with LikeC4 sources to /data
directory
(it is the default working directory, but you can change it and use any other you prefer).
Start local web server
Section titled “Start local web server”# mount LikeC4 sources to /data: -v $(pwd):/data# publish ports: -p 5173:5173# (optional) for realtime updates: -p 24678:24678# (optional) use init process to correctly handle signals (eg Ctrl+C): --init# (optional) enable color output: -tdocker run --rm \ -v $PWD:/data \ --init \ -t \ -p 5173:5173 \ -p 24678:24678 \ ghcr.io/likec4/likec4 \ start
Build static website
Section titled “Build static website”docker run -v $PWD:/data ghcr.io/likec4/likec4 build -o dist
Export to PNG
Section titled “Export to PNG”docker run -v $PWD:/data ghcr.io/likec4/likec4 export png --output assets --theme dark