docker-cheat
provides a single docker image for cheat and its
community-sourced cheatsheets to simplify installation.
- Docker
- Create a
cheat
alias by adding the following line to~/.profile
:alias cheat='docker run --rm bannmann/docker-cheat'
- Rejoice!
Using the command above will not pick up new image versions automatically. To do that, execute the following command manually:
docker pull bannmann/docker-cheat
You could automate this process using a cron job, but make sure that cron only emails the command output in case of errors.
In addition to the community cheatsheets, you can use custom cheatsheets by mapping directories to the following paths inside the docker image:
/v/personal
for your personal cheatsheet directory/v/workdir
for the current working directory (see Directory-scoped Cheatpaths)
To use both options, set up your cheat
alias as follows:
alias cheat='docker run -v ~/.cheat:/v/personal:ro -v $(pwd):/v/workdir:ro --rm bannmann/docker-cheat'
The docker image includes a built-in cheatsheet that can be displayed via cheat docker-cheat
.
- Editing cheatsheets is not supported as the docker image intentionally does not include an editor.
cheat
configuration settings are currently hard-coded inside the container.- Although the
latest
tag on Docker Hub is rebuilt for each new commit on themaster
branch, new versions of thecheat
binary and cheatsheets are not picked up automatically yet. Instead, every once in a while, the respective definitions (Dockerfile
and thecheatsheets
submodule) will be updated with a manual commit. This will probably be automated at some point.