docker-cheat provides a single docker image for cheat and its
community-sourced cheatsheets to simplify installation.
- Docker
- Create a
cheatalias 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/personalfor your personal cheatsheet directory/v/workdirfor 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.
cheatconfiguration settings are currently hard-coded inside the container.- Although the
latesttag on Docker Hub is rebuilt for each new commit on themasterbranch, new versions of thecheatbinary and cheatsheets are not picked up automatically yet. Instead, every once in a while, the respective definitions (Dockerfileand thecheatsheetssubmodule) will be updated with a manual commit. This will probably be automated at some point.